My Project: Mesh Class Reference

My Project

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mesh Class Reference

`#include <mesh.h>`

Inheritance diagram for Mesh:

## Public Member Functions

| Mesh ()
Mesh * | CopyEntity (Entity *ent=NULL)
void | FreeEntity (void)
Surface * | CreateSurface (Brush *Bru=NULL)
Bone * | CreateBone (Entity *parent_ent=NULL)
Mesh * | CopyMesh (Entity *parent_ent=NULL)
Mesh * | RepeatMesh (Entity *parent_ent=NULL)
void | AddMesh (Mesh *mesh2)
void | FlipMesh ()
void | PaintMesh (Brush *bru)
void | MeshColor (float r, float g, float b, float a)
void | MeshColor (float r, float g, float b)
void | MeshRed (float r)
void | MeshGreen (float g)
void | MeshBlue (float b)
void | MeshAlpha (float a)
void | FitMesh (float x, float y, float z, float width, float height, float depth, int uniform=false)
void | ScaleMesh (float sx, float sy, float sz)
void | RotateMesh (float pitch, float yaw, float roll)
void | PositionMesh (float px, float py, float pz)
void | UpdateNormals ()
float | MeshWidth ()
float | MeshHeight ()
float | MeshDepth ()
int | CountSurfaces ()
Surface * | GetSurface (int surf_no_get)
void | SkinMesh (int surf_no_get, int vid, int bone1, float weight1=1.0, int bone2=0, float weight2=0, int bone3=0, float weight3=0, int bone4=0, float weight4=0)
Mesh * | CollapseAnimMesh (Mesh *mesh=NULL)
Mesh * | CollapseChildren (Entity *ent0, Mesh *mesh=NULL)
void | TransformMesh (Matrix &mat)
void | GetBounds ()
int | Alpha ()
void | TreeCheck ()
int | MeshesIntersect (Mesh *mesh2)
Mesh * | MeshCSG (Mesh *mesh2, int method)
void | Update ()
void | Render ()
void | UpdateShadow ()
Public Member Functions inherited from Entity
| Entity ()
void | EntityParent (Entity *parent_ent, int glob=true)
Entity * | GetParent ()
int | CountChildren ()
Entity * | GetChild (int child_no)
Entity * | FindChild (string child_name)
int | CountAllChildren (int no_children=0)
Entity * | GetChildFromAll (int child_no, int &no_children, Entity *ent=NULL)
void | UpdateAllEntities (void(Update)(Entity *ent, Entity *ent2), Entity *ent2=NULL)
void | PositionEntity (float x, float y, float z, int glob=false)
void | MoveEntity (float mx, float my, float mz)
void | TranslateEntity (float tx, float ty, float tz, int glob=false)
void | ScaleEntity (float x, float y, float z, int glob=false)
void | RotateEntity (float x, float y, float z, int glob=false)
void | TurnEntity (float x, float y, float z, int glob=false)
void | PointEntity (Entity *target_ent, float roll=0.0)
float | EntityX (int global=false)
float | EntityY (int global=false)
float | EntityZ (int global=false)
float | EntityYaw (int global=false)
float | EntityPitch (int global=false)
float | EntityRoll (int global=false)
float | EntityScaleX (int glob=false)
float | EntityScaleY (int glob=false)
float | EntityScaleZ (int glob=false)
void | EntityColor (float r, float g, float b, float a, int recursive=false)
void | EntityColor (float r, float g, float b, int recursive=false)
void | EntityRed (float r, int recursive=false)
void | EntityGreen (float g, int recursive=false)
void | EntityBlue (float b, int recursive=false)
void | EntityAlpha (float a, int recursive=false)
void | EntityShininess (float s, int recursive=false)
void | EntityBlend (int blend_no, int recursive=false)
void | EntityFX (int fx_no, int recursive=false)
void | EntityTexture (Texture *texture, int frame=0, int index=0, int recursive=false)
void | PaintEntity (Brush &bru, int recursive=false)
Brush * | GetEntityBrush ()
void | EntityOrder (int order_no, int recursive=false)
void | ShowEntity ()
void | HideEntity ()
int | Hidden ()
void | NameEntity (string e_name)
string | EntityName ()
string | EntityClass ()
void | Animate (int mode=1, float speed=1.0, int seq=0, int trans=0)
void | SetAnimTime (float time, int seq=0)
int | AnimLength ()
float | AnimTime ()
int | ExtractAnimSeq (int first_frame, int last_frame, int seq=0)
int | LoadAnimSeq (string filename)
void | SetAnimKey (float frame, int pos_key=true, int rot_key=true, int scale_key=true)
int | AddAnimSeq (int length)
void | EntityType (int type_no, int recursive=false)
int | GetEntityType ()
void | EntityRadius (float rx, float ry=0.0)
void | EntityBox (float x, float y, float z, float w, float h, float d)
void | ResetEntity ()
Entity * | EntityCollided (int type_no)
int | CountCollisions ()
float | CollisionX (int index)
float | CollisionY (int index)
float | CollisionZ (int index)
float | CollisionNX (int index)
float | CollisionNY (int index)
float | CollisionNZ (int index)
float | CollisionTime (int index)
Entity * | CollisionEntity (int index)
Surface * | CollisionSurface (int index)
int | CollisionTriangle (int index)
void | EntityPickMode (int no, int obscure=true)
float | EntityDistance (Entity *ent2)
float | DeltaYaw (Entity *ent2)
float | DeltaPitch (Entity *ent2)
void | AlignToVector (float x, float y, float z, int axis, float rate)
void | UpdateMat (bool load_identity=false)
void | AddParent (Entity &parent_ent)
float | EntityDistanceSquared (Entity *ent2)
void | MQ_Update ()
void | MQ_GetInvMatrix (Matrix &mat0)
void | MQ_GetMatrix (Matrix &mat3)
void | MQ_SetMatrix (Matrix &inputMatrix)
void | MQ_GetScaleXYZ (float &width, float &height, float &depth)
void | MQ_Turn (float ang, float vx, float vy, float vz, int glob=false)

## Static Public Member Functions

static Mesh * | CreateMesh (Entity *parent_ent=NULL)
static Mesh * | LoadMesh (string filename, Entity *parent_ent=NULL)
static Mesh * | LoadAnimMesh (string filename, Entity *parent_ent=NULL)
static Mesh * | CreateQuad (Entity *parent_ent=NULL)
static Mesh * | CreatePlane (int divs=1, Entity *parent_ent=NULL)
static Mesh * | CreateCube (Entity *parent_ent=NULL)
static Mesh * | CreateSphere (int segments=8, Entity *parent_ent=NULL)
static Mesh * | CreateCylinder (int verticalsegments=8, int solid=true, Entity *parent_ent=NULL)
static Mesh * | CreateCone (int segments=8, int solid=true, Entity *parent_ent=NULL)
static void | CopyBonesList (Entity *ent, vector< Bone *> &bones)
Static Public Member Functions inherited from Entity
static void | TFormPoint (float x, float y, float z, Entity *src_ent, Entity *dest_ent)
static void | TFormVector (float x, float y, float z, Entity *src_ent, Entity *dest_ent)
static void | TFormNormal (float x, float y, float z, Entity *src_ent, Entity *dest_ent)
static float | TFormedX ()
static float | TFormedY ()
static float | TFormedZ ()
static void | UpdateChildren (Entity *ent_p)

## Public Attributes

int | no_surfs
list< Surface * > | surf_list
list< Surface * > | anim_surf_list
vector< Bone * > | bones
Matrix | mat_sp
MeshCollider * | c_col_tree
int | reset_col_tree
int | reset_bounds
float | min_x
float | min_y
float | min_z
float | max_x
float | max_y
float | max_z
Public Attributes inherited from Entity
list< Entity * > | child_list
Entity * | parent
Matrix | mat
Matrix | rotmat
float | px
float | py
float | pz
float | sx
float | sy
float | sz
float | rx
float | ry
float | rz
float | qw
float | qx
float | qy
float | qz
Brush | brush
int | order
float | alpha_order
int | hide
float | cull_radius
string | name
string | class_name
int | anim
int | anim_render
int | anim_mode
float | anim_time
float | anim_speed
int | anim_seq
int | anim_trans
int | anim_dir
vector< int > | anim_seqs_first
vector< int > | anim_seqs_last
int | no_seqs
int | anim_update
int | anim_list
int | collision_type
float | radius_x
float | radius_y
float | box_x
float | box_y
float | box_z
float | box_w
float | box_h
float | box_d
int | no_collisions
vector< CollisionImpact * > | collision
float | old_x
float | old_y
float | old_z
float | old_pitch
float | old_yaw
float | old_roll
float | new_x
float | new_y
float | new_z
int | new_no
Matrix | old_mat
int | dynamic
float | dynamic_x
float | dynamic_y
float | dynamic_z
float | dynamic_yaw
float | dynamic_pitch
float | dynamic_roll
int | pick_mode
int | obscurer

## Additional Inherited Members

Static Public Attributes inherited from Entity
static list< Entity * > | entity_list
static list< Entity * > | animate_list
static float | tformed_x =0.0
static float | tformed_y =0.0
static float | tformed_z =0.0

## Constructor & Destructor Documentation

## § Mesh()

Mesh::Mesh | ( |  | ) |

inline

## Member Function Documentation

## § AddMesh()

void Mesh::AddMesh | ( | Mesh * | mesh2 | ) |

## § Alpha()

int Mesh::Alpha | ( |  | ) |

## § CollapseAnimMesh()

Mesh * Mesh::CollapseAnimMesh | ( | Mesh * | mesh = `NULL` | ) |

## § CollapseChildren()

Mesh * Mesh::CollapseChildren | ( | Entity * | ent0,
|  | Mesh * | mesh = `NULL`
| ) |  |

## § CopyBonesList()

void Mesh::CopyBonesList | ( | Entity * | ent,
|  | vector< Bone *> & | bones
| ) |  |

static

## § CopyEntity()

Mesh * Mesh::CopyEntity | ( | Entity * | ent = `NULL` | ) |

virtual

Implements Entity.

Reimplemented in Sprite.

## § CopyMesh()

Mesh * Mesh::CopyMesh | ( | Entity * | parent_ent = `NULL` | ) |

## § CountSurfaces()

int Mesh::CountSurfaces | ( |  | ) |

## § CreateBone()

Bone * Mesh::CreateBone | ( | Entity * | parent_ent = `NULL` | ) |

## § CreateCone()

Mesh * Mesh::CreateCone | ( | int | segments = `8`,
|  | int | solid = `true`,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § CreateCube()

Mesh * Mesh::CreateCube | ( | Entity * | parent_ent = `NULL` | ) |

static

## § CreateCylinder()

Mesh * Mesh::CreateCylinder | ( | int | verticalsegments = `8`,
|  | int | solid = `true`,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § CreateMesh()

Mesh * Mesh::CreateMesh | ( | Entity * | parent_ent = `NULL` | ) |

static

## § CreatePlane()

Mesh * Mesh::CreatePlane | ( | int | divs = `1`,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § CreateQuad()

Mesh * Mesh::CreateQuad | ( | Entity * | parent_ent = `NULL` | ) |

static

## § CreateSphere()

Mesh * Mesh::CreateSphere | ( | int | segments = `8`,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § CreateSurface()

Surface * Mesh::CreateSurface | ( | Brush * | Bru = `NULL` | ) |

## § FitMesh()

void Mesh::FitMesh | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | width,
|  | float | height,
|  | float | depth,
|  | int | uniform = `false`
| ) |  |

## § FlipMesh()

void Mesh::FlipMesh | ( |  | ) |

## § FreeEntity()

void Mesh::FreeEntity | ( | void |  | ) |

virtual

Reimplemented from Entity.

Reimplemented in Sprite.

## § GetBounds()

void Mesh::GetBounds | ( |  | ) |

## § GetSurface()

Surface * Mesh::GetSurface | ( | int | surf_no_get | ) |

## § LoadAnimMesh()

Mesh * Mesh::LoadAnimMesh | ( | string | filename,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § LoadMesh()

Mesh * Mesh::LoadMesh | ( | string | filename,
|  | Entity * | parent_ent = `NULL`
| ) |  |

static

## § MeshAlpha()

void Mesh::MeshAlpha | ( | float | a | ) |

## § MeshBlue()

void Mesh::MeshBlue | ( | float | b | ) |

## § MeshColor() [1/2]

void Mesh::MeshColor | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

## § MeshColor() [2/2]

void Mesh::MeshColor | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

## § MeshCSG()

Mesh * Mesh::MeshCSG | ( | Mesh * | mesh2,
|  | int | method
| ) |  |

## § MeshDepth()

float Mesh::MeshDepth | ( |  | ) |

## § MeshesIntersect()

int Mesh::MeshesIntersect | ( | Mesh * | mesh2 | ) |

## § MeshGreen()

void Mesh::MeshGreen | ( | float | g | ) |

## § MeshHeight()

float Mesh::MeshHeight | ( |  | ) |

## § MeshRed()

void Mesh::MeshRed | ( | float | r | ) |

## § MeshWidth()

float Mesh::MeshWidth | ( |  | ) |

## § PaintMesh()

void Mesh::PaintMesh | ( | Brush * | bru | ) |

## § PositionMesh()

void Mesh::PositionMesh | ( | float | px,
|  | float | py,
|  | float | pz
| ) |  |

## § Render()

void Mesh::Render | ( |  | ) |

virtual

- ***!ES***

Reimplemented from Entity.

Reimplemented in ParticleBatch, and VoxelSprite.

## § RepeatMesh()

Mesh * Mesh::RepeatMesh | ( | Entity * | parent_ent = `NULL` | ) |

## § RotateMesh()

void Mesh::RotateMesh | ( | float | pitch,
|  | float | yaw,
|  | float | roll
| ) |  |

## § ScaleMesh()

void Mesh::ScaleMesh | ( | float | sx,
|  | float | sy,
|  | float | sz
| ) |  |

## § SkinMesh()

void Mesh::SkinMesh | ( | int | surf_no_get,
|  | int | vid,
|  | int | bone1,
|  | float | weight1 = `1.0`,
|  | int | bone2 = `0`,
|  | float | weight2 = `0`,
|  | int | bone3 = `0`,
|  | float | weight3 = `0`,
|  | int | bone4 = `0`,
|  | float | weight4 = `0`
| ) |  |

## § TransformMesh()

void Mesh::TransformMesh | ( | Matrix & | mat | ) |

## § TreeCheck()

void Mesh::TreeCheck | ( |  | ) |

## § Update()

void Mesh::Update | ( |  | ) |

inlinevirtual

Reimplemented from Entity.

## § UpdateNormals()

void Mesh::UpdateNormals | ( |  | ) |

## § UpdateShadow()

void Mesh::UpdateShadow | ( |  | ) |

## Member Data Documentation

## § anim_surf_list

list<Surface*> Mesh::anim_surf_list

## § bones

vector<Bone*> Mesh::bones

## § c_col_tree

MeshCollider* Mesh::c_col_tree

## § mat_sp

Matrix Mesh::mat_sp

## § max_x

float Mesh::max_x

## § max_y

float Mesh::max_y

## § max_z

float Mesh::max_z

## § min_x

float Mesh::min_x

## § min_y

float Mesh::min_y

## § min_z

float Mesh::min_z

## § no_surfs

int Mesh::no_surfs

## § reset_bounds

int Mesh::reset_bounds

## § reset_col_tree

int Mesh::reset_col_tree

## § surf_list

list<Surface*> Mesh::surf_list

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

- openb3dlib.mod/openb3d/src/mesh.h
- openb3dlib.mod/openb3d/src/mesh.cpp