Game Development Reference
In-Depth Information
The offset into the vertex array to the uv texture is -1, meaning there is no texture for this grid.
private int m_MeshVerticesUVOffset = -1;
The offset into the vertex array to the vertex normal is -1, meaning there are no vertex normals for
this grid.
private int m_MeshVerticesNormalOffset = -1;
The m_Vertices array holds the vertex data for the grid.
private float[] m_Vertices;
The m_DrawOrder array stores the order that the vertices held in m_Vertices are rendered.
private short[] m_DrawOrder;
The number of masses on the grid is held in m_NumberMasses .
private int m_NumberMasses = 0;
The index into the array data for the masses is held in MassesIndex .
private int MassesIndex = 0;
The maximum number of masses allowed on the grid is held in MAX_MASSES .
private int MAX_MASSES = 30;
The values of each of the masses on the grid are held in an array called m_MassValues .
private float[] m_MassValues = new float[MAX_MASSES];
The values of the locations of the masses on the grid are held in an array called m_MassLocations in
the format x, y, z for each mass. So every three float elements in the array represent one mass.
private float[] m_MassLocations = new float[MAX_MASSES*3];
The values for the radius in which to draw the spotlight are stored in m_MassEffectiveRadius .
private float[] m_MassEffectiveRadius = new float[MAX_MASSES];
The spotlight color to place on the grid for each of the masses is stored in m_MassSpotLightColor in
r, g, b format. So, every three float array elements represent data for a single mass.
private float[] m_MassSpotLightColor = new float[MAX_MASSES*3]; // 3 r,g,b values per mass
The shader for this grid is held in m_Shader .
private Shader m_Shader;
 
Search WWH ::




Custom Search