fix compile under linux
This commit is contained in:
parent
f615a07c35
commit
f415db4f87
5 changed files with 19 additions and 14 deletions
3
Makefile
3
Makefile
|
@ -5,7 +5,8 @@ LIBS = -lSDL -lGL -lGLU -Llua/lib -llua -llualib `sdl-config --libs`
|
|||
|
||||
OBJS = main.o lab.o bitmap.o model.o resource.o material.o debug.o \
|
||||
textsplit.o lua.o registry.o localize.o scene.o engine.o actor.o \
|
||||
sound.o mixer.o keyframe.o costume.o walkplane.o textobject.o
|
||||
sound.o mixer.o keyframe.o costume.o walkplane.o textobject.o \
|
||||
matrix3.o matrix4.o
|
||||
|
||||
DEPS = $(OBJS:.o=.d)
|
||||
|
||||
|
|
11
matrix3.cpp
11
matrix3.cpp
|
@ -1,14 +1,14 @@
|
|||
#include <math.h>
|
||||
#include "matrix3.h"
|
||||
|
||||
Matrix3::setAsIdentity( void )
|
||||
void Matrix3::setAsIdentity( void )
|
||||
{
|
||||
right_.set(1.f, 0.f, 0.f);
|
||||
up_.set(0.f, 1.f, 0.f);
|
||||
at_.set(0.f, 0.f, 0.f);
|
||||
}
|
||||
|
||||
Matrix3::buildFromPitchYawRoll( float pitch, float yaw, float roll )
|
||||
void Matrix3::buildFromPitchYawRoll( float pitch, float yaw, float roll )
|
||||
{
|
||||
Matrix3 temp1, temp2;
|
||||
|
||||
|
@ -37,7 +37,7 @@ float DegreeToRadian( float degrees )
|
|||
}
|
||||
|
||||
// right
|
||||
Matrix3::constructAroundPitch( float pitch )
|
||||
void Matrix3::constructAroundPitch( float pitch )
|
||||
{
|
||||
float cosa;
|
||||
float sina;
|
||||
|
@ -51,7 +51,7 @@ Matrix3::constructAroundPitch( float pitch )
|
|||
}
|
||||
|
||||
// up
|
||||
Matrix3::constructAroundYaw( float yaw )
|
||||
void Matrix3::constructAroundYaw( float yaw )
|
||||
{
|
||||
float cosa;
|
||||
float sina;
|
||||
|
@ -65,7 +65,7 @@ Matrix3::constructAroundYaw( float yaw )
|
|||
}
|
||||
|
||||
// at
|
||||
Matrix3::constructAroundRoll( float roll )
|
||||
void Matrix3::constructAroundRoll( float roll )
|
||||
{
|
||||
float cosa;
|
||||
float sina;
|
||||
|
@ -175,3 +175,4 @@ void Matrix3::transform( Vector3d v )
|
|||
|
||||
v.set( x, y, z );
|
||||
}
|
||||
|
||||
|
|
11
matrix3.h
11
matrix3.h
|
@ -27,12 +27,12 @@ public:
|
|||
Vector3d up_;
|
||||
Vector3d at_;
|
||||
|
||||
buildFromPitchYawRoll( float pitch, float yaw, float roll );
|
||||
setAsIdentity(void);
|
||||
void buildFromPitchYawRoll( float pitch, float yaw, float roll );
|
||||
void setAsIdentity(void);
|
||||
|
||||
constructAroundPitch( float pitch );
|
||||
constructAroundYaw( float pitch );
|
||||
constructAroundRoll( float pitch );
|
||||
void constructAroundPitch( float pitch );
|
||||
void constructAroundYaw( float pitch );
|
||||
void constructAroundRoll( float pitch );
|
||||
|
||||
void getPitchYawRoll( float* pPitch, float* pYaw, float* pRoll );
|
||||
|
||||
|
@ -80,3 +80,4 @@ private:
|
|||
};
|
||||
|
||||
#endif // MATRIX_HH
|
||||
|
||||
|
|
|
@ -16,3 +16,4 @@ void Matrix4::translate( float x, float y, float z )
|
|||
|
||||
pos_ += v;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,3 +57,4 @@ private:
|
|||
};
|
||||
|
||||
#endif // MATRIX_HH
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue