Class ActorMultiVertex
ActorMultiVertex
This class inherits all methods from these classes: Actor
Methods
actormultivertex:AddQuadState (offset) | The list of quad states is used to determine which animation state is used for each quad. |
actormultivertex:AddState (table, state_data) | Adds an animation state to the ActorMultiVertex. |
actormultivertex:ForceStateUpdate () | Forces the AMV to update the texture coordinates on all its quads, even if the current state has not changed. |
actormultivertex:GetUseAnimationState () | Returns whether the AMV uses the animation state. |
actormultivertex:SetUseAnimationState (use) |
Sets whether the AMV uses the animation state.
|
actormultivertex:GetNumStates () | Returns the number of states the AMV has. |
actormultivertex:GetNumQuadStates () | Returns the number of quad states in the destination tween state for the AMV. |
actormultivertex:GetState () | Returns the id of the current state. |
actormultivertex:GetDecodeMovie () | Gets whether the AMV should call the decode function for its texture during updates. |
actormultivertex:SetDecodeMovie (bool, decode) | Sets whether the AMV should call the decode function for its texture during updates. |
actormultivertex:SetVertex (index, table) | Sets vertex number index with the properties provided. |
actormultivertex:SetVertices (first, vertices) | Sets multiple vertices at once. |
actormultivertex:SetVertsFromSplines () |
Sets all the drawn verts of the ActorMultiVertex by evaluating the splines.
|
actormultivertex:GetSpline (i) | Returns the requested spline. |
actormultivertex:SetNumVertices (num) | Sets the number of vertices. |
actormultivertex:GetNumVertices (void) | Returns the number of vertices |
actormultivertex:SetDrawState (table) |
Sets the draw state variables to the values in the table.
|
actormultivertex:SetState (int) | Sets the current state. |
actormultivertex:GetQuadState (void) | Returns the offset of the requested quad state. |
actormultivertex:SetQuadState (id, offset) | Sets the offset of the requested quad state. |
actormultivertex:GetStateData (id) | Returns a table containing the data for the requested state. |
actormultivertex:SetStateData (id, table) | Sets the requested state to the data in state_data. |
actormultivertex:SetStateProperties (table) | Each element of the table must be a state_data and is used to construct one state. |
actormultivertex:RemoveState (id) | Removes the requested state from the state list. |
actormultivertex:RemoveQuadState (id) | Removes the requested quad state from the quad state list. |
actormultivertex:SetAllStateDelays (delay) | Sets the delay for every state to delay. |
actormultivertex:SetSecondsIntoAnimation (seconds) | Sets how far into its animation the AMV is. |
actormultivertex:GetDestDrawMode (void) | Get the DrawMode of the destination tween state. |
actormultivertex:GetDestFirstToDraw (void) | Get the FirstToDraw of the destination tween state. |
actormultivertex:GetDestNumToDraw (void) | Get the NumToDraw of the destination tween state. |
actormultivertex:GetCurrDrawMode (void) | Get the DrawMode of the current tween state. |
actormultivertex:GetCurrFirstToDraw (void) | Get the FirstToDraw of the current tween state. |
actormultivertex:GetCurrNumToDraw (void) | Get the NumToDraw of the current tween state. |
actormultivertex:GetTexture () | Returns the ActorMultiVertex's texture. |
actormultivertex:SetEffectMode (EffectMode, em) | Sets the EffectMode of the ActorMultiVertex. |
actormultivertex:SetTextureMode (TextureMode, tm) | Sets the TextureMode of the ActorMultiVertex. |
actormultivertex:SetLineWidth (float, width) | Sets the width of the line for DrawMode_LineStrip. |
actormultivertex:SetTexture (RageTexture, texture) | Sets the texture to texture |
actormultivertex:LoadTexture (string, path) | Sets the texture at from the file path path . |
Methods
- actormultivertex:AddQuadState (offset)
-
The list of quad states is used to determine which animation state is used for each quad. The offset is added to the AMV's current state, and the resulting state is used.
Parameters:
- offset
Returns:
- actormultivertex:AddState (table, state_data)
-
Adds an animation state to the ActorMultiVertex. The state_data table must be like this:
{{left, top, right, bottom}, delay}<br /> left, top, right, and bottom are pixel coordinates, starting at 0. If delay is 0 or negative, the state will last forever.
Parameters:
- table
- state_data
Returns:
- actormultivertex:ForceStateUpdate ()
-
Forces the AMV to update the texture coordinates on all its quads, even if the current state has not changed.
Returns:
- actormultivertex:GetUseAnimationState ()
-
Returns whether the AMV uses the animation state.
Returns:
-
bool
- actormultivertex:SetUseAnimationState (use)
-
Sets whether the AMV uses the animation state.
This works best when using DrawMode_Quads.<br /> AMV's can have animated textures like sprites. Each state tells the AMV what part of the texture to use, and how long the state lasts.<br /> Use AddState to add a state onto the end, or SetStateProperties to set all the states at once, or SetState to set a single state.<br /> Each quad has its own offset that is added to the current state. Use AddQuadState to add to the list of quad states, or SetQuadState to set an existing quad state.
Parameters:
- use boolean
Returns:
-
void
- actormultivertex:GetNumStates ()
-
Returns the number of states the AMV has.
Returns:
-
int
- actormultivertex:GetNumQuadStates ()
-
Returns the number of quad states in the destination tween state for the AMV.
Returns:
-
int
- actormultivertex:GetState ()
-
Returns the id of the current state.
Returns:
-
int
- actormultivertex:GetDecodeMovie ()
-
Gets whether the AMV should call the decode function for its texture during updates.
Returns:
-
bool
- actormultivertex:SetDecodeMovie (bool, decode)
-
Sets whether the AMV should call the decode function for its texture during updates.
Parameters:
- bool
- decode
Returns:
- actormultivertex:SetVertex (index, table)
-
Sets vertex number
index
with the properties provided. The tables of properties are each optional and can be provided in any order.Parameters:
- index number
- table table pos, table color, table textcoords }
Returns:
-
void
- actormultivertex:SetVertices (first, vertices)
-
Sets multiple vertices at once. The elements of
vertices
should themselves be tables, of the form provided to SetVertex. Ifvertices
is the first argument it will start from vertex 1. If an integer is provided beforevertices
it will start from that vertex. It will add vertices as necessary.Example: self:SetVertices( { { { x1, y1, z1 } , { r1,g1,b1,a1 } , { tcx1,tcy1 } }; { { x2, y2, z2 } , { r2,g2,b2,a2 } , { tcx2,tcy2 } } } )
Parameters:
- first
- vertices
Returns:
-
void
- actormultivertex:SetVertsFromSplines ()
-
Sets all the drawn verts of the ActorMultiVertex by evaluating the splines.
("all the drawn verts" means all the verts between FirstToDraw and NumToDraw, the verts that are set to draw in the current tween state.)<br /> The parts of the ActorMultiVertex are evenly spaced along the spline in terms of t value.<br /> The exact behavior depends on the draw mode.<br /> DrawMode_Quads uses all 4 splines, one for each corner.<br /> DrawMode_QuadStrip and DrawMode_Strip use 2 splines, one for each edge of the strip.<br /> DrawMode_Fan uses one spline, for the edge verts of the fan. The first vert is not touched because it is the center.<br /> DrawMode_Triangles uses 3 splines, one for each corner.<br /> DrawMode_SymmetricQuadStrip uses 3 splines, one on each edge and one in the center.<br /> DrawMode_LineStrip uses 1 spline.<br />
Returns:
- actormultivertex:GetSpline (i)
-
Returns the requested spline. Spline indices range from 1 to 4.
ActorMultiVertex splines are not inside the tween state, and will not change the verts until you call SetVertsFromSplines.
Parameters:
- i
Returns:
-
CubicSplineN
- actormultivertex:SetNumVertices (num)
-
Sets the number of vertices.
Parameters:
- num
Returns:
-
void
- actormultivertex:GetNumVertices (void)
-
Returns the number of vertices
Parameters:
- void
Returns:
-
void
- actormultivertex:SetDrawState (table)
-
Sets the draw state variables to the values in the table.
Mode must be a <Link class='ENUM' function='DrawMode'>DrawMode</Link>.<br /> First is the index of the first vertex to draw.<br /> Num is the number of vertices to draw. -1 for Num means draw all verts after First.<br /> Any value not in the table defaults to the already set value.<br /> Examples:<br /> -- Sets all three parts of the draw state.<br /> self:SetDrawState{Mode="DrawMode_Quads", First= 1, Num= -1}<br /> -- Set only the draw mode. First and Num remain unchanged from previous.<br /> self:SetDrawState{Mode="DrawMode_Quads"}<br /> -- Set the first and number to draw. Draw mode remains unchanged.<br /> self:SetDrawState{First= 3, Num= 4}<br />
Parameters:
- table table { Mode= mode, First= first, Num= num }
Returns:
-
void
- actormultivertex:SetState (int)
-
Sets the current state.
Parameters:
- int
Returns:
-
void
- actormultivertex:GetQuadState (void)
-
Returns the offset of the requested quad state.
Parameters:
- void
Returns:
-
int
- actormultivertex:SetQuadState (id, offset)
-
Sets the offset of the requested quad state.
Parameters:
- id
- offset
Returns:
-
void
- actormultivertex:GetStateData (id)
-
Returns a table containing the data for the requested state.
Parameters:
- id
Returns:
-
table
- actormultivertex:SetStateData (id, table)
-
Sets the requested state to the data in state_data. Similar to AddState, but SetStateData only works on states that have already been added.
Parameters:
- id
- table
Returns:
-
void
- actormultivertex:SetStateProperties (table)
-
Each element of the table must be a state_data and is used to construct one state. The table as a whole is the entire list of all states for the AMV.
Parameters:
- table table {state_data, ...}
Returns:
-
void
- actormultivertex:RemoveState (id)
-
Removes the requested state from the state list.
Parameters:
- id
- actormultivertex:RemoveQuadState (id)
-
Removes the requested quad state from the quad state list.
Parameters:
- id
Returns:
-
table
- actormultivertex:SetAllStateDelays (delay)
-
Sets the delay for every state to delay. (seconds)
Parameters:
- delay
- actormultivertex:SetSecondsIntoAnimation (seconds)
-
Sets how far into its animation the AMV is.
Parameters:
- seconds
Returns:
-
table
- actormultivertex:GetDestDrawMode (void)
-
Get the DrawMode of the destination tween state.
Parameters:
- void
Returns:
-
DrawMode
- actormultivertex:GetDestFirstToDraw (void)
-
Get the FirstToDraw of the destination tween state.
Parameters:
- void
Returns:
-
int
- actormultivertex:GetDestNumToDraw (void)
-
Get the NumToDraw of the destination tween state.
Parameters:
- void
Returns:
-
int
- actormultivertex:GetCurrDrawMode (void)
-
Get the DrawMode of the current tween state.
Parameters:
- void
Returns:
-
DrawMode
- actormultivertex:GetCurrFirstToDraw (void)
-
Get the FirstToDraw of the current tween state.
Parameters:
- void
Returns:
-
int
- actormultivertex:GetCurrNumToDraw (void)
-
Get the NumToDraw of the current tween state.
Parameters:
- void
Returns:
-
int
- actormultivertex:GetTexture ()
-
Returns the ActorMultiVertex's texture.
Returns:
-
RageTexture
- actormultivertex:SetEffectMode (EffectMode, em)
-
Sets the EffectMode of the ActorMultiVertex.
Parameters:
- EffectMode
- em
Returns:
-
void
- actormultivertex:SetTextureMode (TextureMode, tm)
-
Sets the TextureMode of the ActorMultiVertex.
Parameters:
- TextureMode
- tm
Returns:
-
void
- actormultivertex:SetLineWidth (float, width)
-
Sets the width of the line for DrawMode_LineStrip.
Parameters:
- float
- width
Returns:
-
void
- actormultivertex:SetTexture (RageTexture, texture)
-
Sets the texture to
texture
Parameters:
- RageTexture
- texture
Returns:
-
void
- actormultivertex:LoadTexture (string, path)
-
Sets the texture at from the file path
path
.Parameters:
- string
- path
Returns:
-
void