|
GetSpriteVertexX | |
Xpos# = GetSpriteVertexX(SpriteIndex, VertexIndex) | |
Parameters: SpriteIndex = The Sprite you wish to query VertexIndex = The vertex you wish to read ranges between (0 and 3) |
|
Returns: Xpos# = The X position of this vertex |
|
The GetSpriteVertexX function returns the position of a sprite corner vertex. This position is post rotation & scaling. The corner vertex of a sprite are ordered in a clock wise fashion. Vertex zero being the Top-Left, Vertex One is the Top-Right, Vertex three is the bottom/right and Vertex four is the Bottom-Left So if the image isn't rotated, they'd look like this.
FACTS: * GetSpriteVertexX returns the position of the vertex after rotation and scaling have been applied to the sprite. * Also see PositionSprite, ScaleSprite, RotateSprite Mini Tutorial: This example creates a random image, creates 10 randomly positioned sprites on the screen using this image. The main loop rotates the sprites and draws the bounding egdes via reading the sprites vertex positions.
|
Related Info: | GetSpriteOldX | GetSpriteOldY | GetSpriteOldZ | GetSpriteVertexY | GetSpriteX | GetSpriteY | GetSpriteZ : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |