Shapes 3D  3.0
 All Classes Functions Variables Pages
shapes3d.utils.MD2_Data Class Reference

Public Member Functions

 MD2_Data (int numFrames, int numXYZ, int framesize, PVector[] points, PVector modOffset, PVector modSize, int[] glCommand, MD2_Vertex[] glVertex, PImage skin, MD2_AnimState[] state)
 
void centreModel ()
 
void centreModel (PVector offset)
 
void scaleModel (float scale)
 
void orientModel (Orientation orientation)
 
String toString ()
 

Public Attributes

int numFrames
 
int numXYZ
 
PVector[] point
 
PVector modOffset
 
PVector modSize
 
int[] glComannd
 
MD2_Vertex[] glVertex
 
MD2_AnimState[] anim_state
 
PImage skin
 

Detailed Description

This class is a simple structure to store MD2 data loaded from a file using the MD2 class.
This data would then be used to create the actual 3D model (MD2_Model class) to be used in your program.
NOTE: this structure can be safely shared by multiple models.

Author
Peter Lager

Member Function Documentation

void shapes3d.utils.MD2_Data.centreModel ( )

Centers the model so it evenly spaced over (0,0,0) Note: this will change all the XYZ points in the model

void shapes3d.utils.MD2_Data.centreModel ( PVector  offset)

Centers the model so it evenly spaced over a given offset useful if we have 2 linked models. Note: this will change all the XYZ points in the model

Parameters
offsetthe distance to move vertices
void shapes3d.utils.MD2_Data.orientModel ( Orientation  orientation)

Orients the model.

Parameters
orientation
void shapes3d.utils.MD2_Data.scaleModel ( float  scale)

Scales the model Note: this will change all the XYZ points in the model

Parameters
scalethe scale factor to apply to vertices
String shapes3d.utils.MD2_Data.toString ( )

Display the model statistics and memory usage


The documentation for this class was generated from the following file: