Class ActorMultiVertex

ActorMultiVertex (Inherits 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.

    This works best when using DrawMode_Quads.<br />
    AMV's can have animated textures like sprites.
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.

    ("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.
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.

    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.
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. If vertices is the first argument it will start from vertex 1. If an integer is provided before vertices 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
generated by LDoc 1.4.6 Last updated 2023-01-15 03:25:11