My Project: openb3dlib.mod/methods.h Source File

My Project

methods.h
Go to the documentation of this file.
1 // methods.h
2
3 extern "C" {
4
5 // Animation
6 void AnimateMesh(Mesh* ent1,float framef,int start_frame,int end_frame);
7 void AnimateMesh2(Mesh* ent1,float framef,int start_frame,int end_frame);
8 void AnimateMesh3(Mesh* ent1);
9 void VertexDeform(Mesh* ent);
10
11 // AnimationKeys
12 AnimationKeys* AnimationKeysCopy( AnimationKeys* obj );
13
14 // Brush
15 Brush* BrushCopy( Brush* obj );
16 int CompareBrushes( Brush* brush1,Brush* brush2 );
17
18 // Camera
19 void ExtractFrustum( Camera* obj );
20 float EntityInFrustum( Camera* obj,Entity* ent );
21 void CameraUpdate( Camera* obj );
22 void CameraRender( Camera* obj );
23 void UpdateSprite( Camera* obj,Sprite& sprite );
24 void AddTransformedSpriteToSurface( Camera* obj,Sprite& sprite,Surface* surf );
25 void RenderListAdd( Camera* obj,Mesh* mesh );
26 void accPerspective( Camera* obj,float fovy,float aspect,float zNear,float zFar,float pixdx,float pixdy,float eyedx,float eyedy,float focus );
27 void accFrustum( Camera* obj,float left_,float right_,float bottom,float top,float zNear,float zFar,float pixdx,float pixdy,float eyedx,float eyedy,float focus );
28 void UpdateProjMatrix( Camera* obj );
29 void CameraUpdateEntityRender( Entity* ent,Entity* cam );
30
31 // Entity
32 int CountAllChildren( Entity* obj,int no_children );
33 Entity* GetChildFromAll( Entity* obj,int child_no,int &no_children,Entity* ent );
34 int Hidden( Entity* obj );
35 void AlignToVector( Entity* obj,float x,float y,float z,int axis,float rate );
36 void UpdateMat( Entity* obj,bool load_identity );
37 void AddParent( Entity* obj,Entity &parent_ent );
38 void UpdateChildren( Entity* ent_p );
39 float EntityDistanceSquared( Entity* obj,Entity* ent2 );
40 void MQ_Update( Entity* obj );
41 void MQ_GetInvMatrix( Entity* obj,Matrix &mat0 );
42 void MQ_GetMatrix( Entity* obj,Matrix &mat3 );
43 //int MQ_SetMatrix( Entity* obj );
44 void MQ_SetMatrix( Entity* obj,Matrix &inputMatrix );
45 void MQ_GetScaleXYZ( Entity* obj,float &width,float &height,float &depth );
46 void MQ_Turn( Entity* obj,float ang,float vx,float vy,float vz,int glob );
47 //void UpdateAllEntities( void(Update)(Entity* ent,Entity* ent2),Entity* ent2=NULL );
48
49 // Global
50 void UpdateEntityAnim( Mesh& mesh );
51 //bool GlobalCompareEntityOrder( Entity* ent1,Entity* ent2 );
52
53 // Light
54 void LightUpdate( Light* obj );
55
56 // Matrix
57 void MatrixLoadIdentity( Matrix* obj );
58 Matrix* MatrixCopy( Matrix* obj );
59 void MatrixOverwrite( Matrix* obj,Matrix &mat );
60 void MatrixGetInverse( Matrix* obj,Matrix &mat );
61 void MatrixMultiply( Matrix* obj,Matrix &mat );
62 void MatrixTranslate( Matrix* obj,float x,float y,float z );
63 void MatrixScale( Matrix* obj,float x,float y,float z );
64 void MatrixRotate( Matrix* obj,float rx,float ry,float rz );
65 void MatrixRotatePitch( Matrix* obj,float ang );
66 void MatrixRotateYaw( Matrix* obj,float ang );
67 void MatrixRotateRoll( Matrix* obj,float ang );
68 void MatrixFromQuaternion( Matrix* obj,float x,float y,float z,float w );
69 void MatrixTransformVec( Matrix* obj,float &rx,float &ry,float &rz,int addTranslation=0 );
70 void MatrixTranspose( Matrix* obj );
71 void MatrixSetTranslate( Matrix* obj,float x,float y,float z );
72 void MatrixMultiply2( Matrix* obj,Matrix &mat );
73 void MatrixGetInverse2( Matrix* obj,Matrix &mat );
74 float MatrixGetPitch( Matrix* obj );
75 float MatrixGetYaw( Matrix* obj );
76 float MatrixGetRoll( Matrix* obj );
77 void MatrixFromToRotation( Matrix* obj,float ix,float iy,float iz,float jx,float jy,float jz );
78 void MatrixToQuat( Matrix* obj,float &qx,float &qy,float &qz,float &qw );
79 void MatrixQuaternion_FromAngleAxis( float angle,float ax,float ay,float az,float &rx,float &ry,float &rz,float &rw );
80 void MatrixQuaternion_MultiplyQuat( float x1,float y1,float z1,float w1,float x2,float y2,float z2,float w2,float &rx,float &ry,float &rz,float &rw );
81 void MatrixInterpolateMatrix( Matrix &m,Matrix &a,float alpha );
82
83 // Mesh
84 void MeshColor( Mesh* obj,float r,float g,float b,float a );
85 void MeshRed( Mesh* obj,float r );
86 void MeshGreen( Mesh* obj,float g );
87 void MeshBlue( Mesh* obj,float b );
88 void MeshAlpha( Mesh* obj,float a );
89 void CopyBonesList( Entity* ent,vector<Bone*>& bones );
90 Mesh* CollapseAnimMesh( Mesh* obj,Mesh* mesh );
91 Mesh* CollapseChildren( Mesh* obj,Entity* ent0,Mesh* mesh );
92 void TransformMesh( Mesh* obj,Matrix& mat );
93 void GetBounds( Mesh* obj );
94 int Alpha( Mesh* obj );
95 void TreeCheck( Mesh* obj );
96 void MeshRender( Mesh* obj );
97 void UpdateShadow( Mesh* obj );
98
99 // Model
100
101 /*Mesh* LoadAnimB3D(string f_name,Entity* parent_ent_ext=NULL);
102 string b3dReadString(File* file);
103 string ReadTag(File* file);
104 int NewTag(string tag);
105 int TagID(string tag);
106 void TrimVerts(Surface* surf);*/
107
108 // Pick
109 Entity* PickMain( float ax,float ay,float az,float bx,float by,float bz,float radius );
110
111 // ShadowObject
112 void SetShadowColor( int R,int G,int B,int A );
113 void ShadowInit();
114 void RemoveShadowfromMesh( ShadowObject* obj,Mesh* M );
115 void ShadowObjectUpdate( Camera* Cam );
116 void RenderVolume();
117 void UpdateAnim( ShadowObject* obj );
118 void ShadowObjectInit( ShadowObject* obj );
119 void InitShadow( ShadowObject* obj );
120 void UpdateCaster( ShadowObject* obj );
121 void ShadowRenderWorldZFail();
122
123 // Sprite
124 void SpriteTexCoords( Sprite* obj,int cell_x,int cell_y,int cell_w,int cell_h,int tex_w,int tex_h,int uv_set );
125 void SpriteVertexColor( Sprite* obj,int v,float r,float g,float b );
126
127 // Surface
128 Surface* SurfaceCopy( Surface* obj );
129 void SurfaceColor( Surface* obj,float r,float g,float b,float a );
130 void SurfaceRed( Surface* obj,float r );
131 void SurfaceGreen( Surface* obj,float g );
132 void SurfaceBlue( Surface* obj,float b );
133 void SurfaceAlpha( Surface* obj,float a );
134 void SurfaceUpdateNormals( Surface* obj );
135 float TriangleNX( Surface* obj,int tri_no );
136 float TriangleNY( Surface* obj,int tri_no );
137 float TriangleNZ( Surface* obj,int tri_no );
138 void UpdateVBO( Surface* obj );
139 void FreeVBO( Surface* obj );
140 void RemoveTri( Surface* obj,int tri );
141
142 // Terrain
143 void UpdateTerrain( Terrain* obj );
144 void RecreateROAM( Terrain* obj );
145 void drawsub( Terrain* obj,int l,float v0[],float v1[],float v2[] );
146 void TerrainUpdateNormals( Terrain* obj );
147 //virtual void TreeCheck(CollisionInfo* ci);
148 void col_tree_sub( Terrain* obj,int l,float v0[],float v1[],float v2[] );
149
150 // Texture
151 Texture* TextureCopy( Texture* obj );
152 Texture* TexInList( Texture* obj );
153 void FilterFlags( Texture* obj );
154 //static string Strip(string filename);
155
156 } // extern "C"
157
EntityDistanceSquared
float EntityDistanceSquared(Entity *obj, Entity *ent2)
Definition: methods.cpp:121
CountAllChildren
int CountAllChildren(Entity *obj, int no_children)
Definition: methods.cpp:93
MatrixRotateYaw
void MatrixRotateYaw(Matrix *obj, float ang)
Definition: methods.cpp:202
SurfaceRed
void SurfaceRed(Surface *obj, float r)
Definition: methods.cpp:392
Mesh
Definition: mesh.h:34
accPerspective
void accPerspective(Camera *obj, float fovy, float aspect, float zNear, float zFar, float pixdx, float pixdy, float eyedx, float eyedy, float focus)
Definition: methods.cpp:75
M
#define M(row, col)
MeshBlue
void MeshBlue(Mesh *obj, float b)
Definition: methods.cpp:280
InitShadow
void InitShadow(ShadowObject *obj)
Definition: methods.cpp:360
MatrixCopy
Matrix * MatrixCopy(Matrix *obj)
Definition: methods.cpp:170
Surface
Definition: surface.h:19
MatrixOverwrite
void MatrixOverwrite(Matrix *obj, Matrix &mat)
Definition: methods.cpp:174
MeshRender
void MeshRender(Mesh *obj)
Definition: methods.cpp:316
FilterFlags
void FilterFlags(Texture *obj)
Definition: methods.cpp:468
MatrixRotatePitch
void MatrixRotatePitch(Matrix *obj, float ang)
Definition: methods.cpp:198
UpdateAnim
void UpdateAnim(ShadowObject *obj)
Definition: methods.cpp:352
UpdateCaster
void UpdateCaster(ShadowObject *obj)
Definition: methods.cpp:364
ShadowInit
void ShadowInit()
Definition: methods.cpp:336
Light
Definition: light.h:19
Terrain
Definition: terrain.h:22
SurfaceAlpha
void SurfaceAlpha(Surface *obj, float a)
Definition: methods.cpp:404
ShadowRenderWorldZFail
void ShadowRenderWorldZFail()
Definition: methods.cpp:368
SurfaceGreen
void SurfaceGreen(Surface *obj, float g)
Definition: methods.cpp:396
Hidden
int Hidden(Entity *obj)
Definition: methods.cpp:101
MatrixFromQuaternion
void MatrixFromQuaternion(Matrix *obj, float x, float y, float z, float w)
Definition: methods.cpp:210
ShadowObjectUpdate
void ShadowObjectUpdate(Camera *Cam)
Definition: methods.cpp:344
B
#define B(row, col)
SurfaceColor
void SurfaceColor(Surface *obj, float r, float g, float b, float a)
Definition: methods.cpp:388
MatrixQuaternion_FromAngleAxis
void MatrixQuaternion_FromAngleAxis(float angle, float ax, float ay, float az, float &rx, float &ry, float &rz, float &rw)
Definition: methods.cpp:254
MeshAlpha
void MeshAlpha(Mesh *obj, float a)
Definition: methods.cpp:284
SpriteTexCoords
void SpriteTexCoords(Sprite *obj, int cell_x, int cell_y, int cell_w, int cell_h, int tex_w, int tex_h, int uv_set)
Definition: methods.cpp:374
CollapseAnimMesh
Mesh * CollapseAnimMesh(Mesh *obj, Mesh *mesh)
Definition: methods.cpp:292
MatrixMultiply
void MatrixMultiply(Matrix *obj, Matrix &mat)
Definition: methods.cpp:182
Camera
Definition: camera.h:23
SurfaceUpdateNormals
void SurfaceUpdateNormals(Surface *obj)
Definition: methods.cpp:408
TexInList
Texture * TexInList(Texture *obj)
Definition: methods.cpp:464
MQ_Turn
void MQ_Turn(Entity *obj, float ang, float vx, float vy, float vz, int glob)
Definition: methods.cpp:148
TriangleNY
float TriangleNY(Surface *obj, int tri_no)
Definition: methods.cpp:416
SetShadowColor
void SetShadowColor(int R, int G, int B, int A)
Definition: methods.cpp:332
AnimationKeys
Definition: animation_keys.h:17
ShadowObject
Definition: shadow.h:50
AnimateMesh2
void AnimateMesh2(Mesh *ent1, float framef, int start_frame, int end_frame)
Definition: methods.cpp:17
MatrixFromToRotation
void MatrixFromToRotation(Matrix *obj, float ix, float iy, float iz, float jx, float jy, float jz)
Definition: methods.cpp:246
RenderListAdd
void RenderListAdd(Camera *obj, Mesh *mesh)
Definition: methods.cpp:71
MatrixGetInverse2
void MatrixGetInverse2(Matrix *obj, Matrix &mat)
Definition: methods.cpp:230
MQ_GetInvMatrix
void MQ_GetInvMatrix(Entity *obj, Matrix &mat0)
Definition: methods.cpp:128
Sprite
Definition: sprite.h:18
drawsub
void drawsub(Terrain *obj, int l, float v0[], float v1[], float v2[])
Definition: methods.cpp:446
MeshColor
void MeshColor(Mesh *obj, float r, float g, float b, float a)
Definition: methods.cpp:268
MatrixTranspose
void MatrixTranspose(Matrix *obj)
Definition: methods.cpp:218
Entity
Definition: entity.h:27
UpdateTerrain
void UpdateTerrain(Terrain *obj)
Definition: methods.cpp:438
SpriteVertexColor
void SpriteVertexColor(Sprite *obj, int v, float r, float g, float b)
Definition: methods.cpp:378
EntityInFrustum
float EntityInFrustum(Camera *obj, Entity *ent)
Definition: methods.cpp:51
MatrixTransformVec
void MatrixTransformVec(Matrix *obj, float &rx, float &ry, float &rz, int addTranslation=0)
Definition: methods.cpp:214
CameraUpdate
void CameraUpdate(Camera *obj)
Definition: methods.cpp:55
AnimationKeysCopy
AnimationKeys * AnimationKeysCopy(AnimationKeys *obj)
Definition: methods.cpp:31
MatrixScale
void MatrixScale(Matrix *obj, float x, float y, float z)
Definition: methods.cpp:190
MatrixMultiply2
void MatrixMultiply2(Matrix *obj, Matrix &mat)
Definition: methods.cpp:226
UpdateMat
void UpdateMat(Entity *obj, bool load_identity)
Definition: methods.cpp:109
MatrixSetTranslate
void MatrixSetTranslate(Matrix *obj, float x, float y, float z)
Definition: methods.cpp:222
VertexDeform
void VertexDeform(Mesh *ent)
Definition: methods.cpp:25
MQ_SetMatrix
void MQ_SetMatrix(Entity *obj, Matrix &inputMatrix)
Definition: methods.cpp:140
CollapseChildren
Mesh * CollapseChildren(Mesh *obj, Entity *ent0, Mesh *mesh)
Definition: methods.cpp:296
MatrixRotate
void MatrixRotate(Matrix *obj, float rx, float ry, float rz)
Definition: methods.cpp:194
TextureCopy
Texture * TextureCopy(Texture *obj)
Definition: methods.cpp:460
TerrainUpdateNormals
void TerrainUpdateNormals(Terrain *obj)
Definition: methods.cpp:450
CameraUpdateEntityRender
void CameraUpdateEntityRender(Entity *ent, Entity *cam)
Definition: methods.cpp:87
AnimateMesh
void AnimateMesh(Mesh *ent1, float framef, int start_frame, int end_frame)
Definition: methods.cpp:13
MeshRed
void MeshRed(Mesh *obj, float r)
Definition: methods.cpp:272
UpdateShadow
void UpdateShadow(Mesh *obj)
Definition: methods.cpp:320
MatrixTranslate
void MatrixTranslate(Matrix *obj, float x, float y, float z)
Definition: methods.cpp:186
UpdateSprite
void UpdateSprite(Camera *obj, Sprite &sprite)
Definition: methods.cpp:63
MQ_GetScaleXYZ
void MQ_GetScaleXYZ(Entity *obj, float &width, float &height, float &depth)
Definition: methods.cpp:144
MatrixRotateRoll
void MatrixRotateRoll(Matrix *obj, float ang)
Definition: methods.cpp:206
RenderVolume
void RenderVolume()
Definition: methods.cpp:348
Alpha
int Alpha(Mesh *obj)
Definition: methods.cpp:308
Texture
Definition: texture.h:23
SurfaceCopy
Surface * SurfaceCopy(Surface *obj)
Definition: methods.cpp:384
GetBounds
void GetBounds(Mesh *obj)
Definition: methods.cpp:304
ExtractFrustum
void ExtractFrustum(Camera *obj)
Definition: methods.cpp:47
CompareBrushes
int CompareBrushes(Brush *brush1, Brush *brush2)
Definition: methods.cpp:41
TransformMesh
void TransformMesh(Mesh *obj, Matrix &mat)
Definition: methods.cpp:300
Matrix
Definition: matrix.h:18
GetChildFromAll
Entity * GetChildFromAll(Entity *obj, int child_no, int &no_children, Entity *ent)
Definition: methods.cpp:97
load3ds::mesh
Mesh * mesh
Definition: 3ds.cpp:46
UpdateProjMatrix
void UpdateProjMatrix(Camera *obj)
Definition: methods.cpp:83
FreeVBO
void FreeVBO(Surface *obj)
Definition: methods.cpp:428
ShadowObjectInit
void ShadowObjectInit(ShadowObject *obj)
Definition: methods.cpp:356
MQ_GetMatrix
void MQ_GetMatrix(Entity *obj, Matrix &mat3)
Definition: methods.cpp:132
LightUpdate
void LightUpdate(Light *obj)
Definition: methods.cpp:160
SurfaceBlue
void SurfaceBlue(Surface *obj, float b)
Definition: methods.cpp:400
RecreateROAM
void RecreateROAM(Terrain *obj)
Definition: methods.cpp:442
AddTransformedSpriteToSurface
void AddTransformedSpriteToSurface(Camera *obj, Sprite &sprite, Surface *surf)
Definition: methods.cpp:67
AlignToVector
void AlignToVector(Entity *obj, float x, float y, float z, int axis, float rate)
Definition: methods.cpp:105
MatrixGetRoll
float MatrixGetRoll(Matrix *obj)
Definition: methods.cpp:242
MQ_Update
void MQ_Update(Entity *obj)
Definition: methods.cpp:125
MatrixGetYaw
float MatrixGetYaw(Matrix *obj)
Definition: methods.cpp:238
AddParent
void AddParent(Entity *obj, Entity &parent_ent)
Definition: methods.cpp:113
MeshGreen
void MeshGreen(Mesh *obj, float g)
Definition: methods.cpp:276
UpdateVBO
void UpdateVBO(Surface *obj)
Definition: methods.cpp:424
Brush
Definition: brush.h:21
AnimateMesh3
void AnimateMesh3(Mesh *ent1)
Definition: methods.cpp:21
TriangleNZ
float TriangleNZ(Surface *obj, int tri_no)
Definition: methods.cpp:420
accFrustum
void accFrustum(Camera *obj, float left_, float right_, float bottom, float top, float zNear, float zFar, float pixdx, float pixdy, float eyedx, float eyedy, float focus)
Definition: methods.cpp:79
MatrixGetInverse
void MatrixGetInverse(Matrix *obj, Matrix &mat)
Definition: methods.cpp:178
MatrixLoadIdentity
void MatrixLoadIdentity(Matrix *obj)
Definition: methods.cpp:166
BrushCopy
Brush * BrushCopy(Brush *obj)
Definition: methods.cpp:37
RemoveTri
void RemoveTri(Surface *obj, int tri)
Definition: methods.cpp:432
MatrixQuaternion_MultiplyQuat
void MatrixQuaternion_MultiplyQuat(float x1, float y1, float z1, float w1, float x2, float y2, float z2, float w2, float &rx, float &ry, float &rz, float &rw)
Definition: methods.cpp:258
TreeCheck
void TreeCheck(Mesh *obj)
Definition: methods.cpp:312
UpdateEntityAnim
void UpdateEntityAnim(Mesh &mesh)
Definition: methods.cpp:154
RemoveShadowfromMesh
void RemoveShadowfromMesh(ShadowObject *obj, Mesh *M)
Definition: methods.cpp:340
CopyBonesList
void CopyBonesList(Entity *ent, vector< Bone *> &bones)
Definition: methods.cpp:288
MatrixGetPitch
float MatrixGetPitch(Matrix *obj)
Definition: methods.cpp:234
PickMain
Entity * PickMain(float ax, float ay, float az, float bx, float by, float bz, float radius)
Definition: methods.cpp:326
col_tree_sub
void col_tree_sub(Terrain *obj, int l, float v0[], float v1[], float v2[])
Definition: methods.cpp:454
MatrixInterpolateMatrix
void MatrixInterpolateMatrix(Matrix &m, Matrix &a, float alpha)
Definition: methods.cpp:262
TriangleNX
float TriangleNX(Surface *obj, int tri_no)
Definition: methods.cpp:412
A
#define A(row, col)
UpdateChildren
void UpdateChildren(Entity *ent_p)
Definition: methods.cpp:117
MatrixToQuat
void MatrixToQuat(Matrix *obj, float &qx, float &qy, float &qz, float &qw)
Definition: methods.cpp:250
CameraRender
void CameraRender(Camera *obj)
Definition: methods.cpp:59