Skip to content

Commit

Permalink
removed dos line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr committed May 14, 2010
1 parent 2ed5770 commit 7d91452
Show file tree
Hide file tree
Showing 107 changed files with 5,152 additions and 5,105 deletions.
2 changes: 1 addition & 1 deletion include/ai.h
Expand Up @@ -2,7 +2,7 @@
#define _AI_H

#include "carinput.h"
#include "reseatable_reference.h"
#include "reseatable_reference.h"
#include "scenenode.h"

#include <vector>
Expand Down
18 changes: 9 additions & 9 deletions include/bezier.h
Expand Up @@ -14,17 +14,17 @@ class BEZIER
{
friend class AI;
friend class TRACK;
friend class ROADPATCH;

friend class ROADPATCH;

public:
BEZIER();
~BEZIER();
BEZIER(const BEZIER & other) {CopyFrom(other);}
BEZIER & operator=(const BEZIER & other) {return CopyFrom(other);}
BEZIER & CopyFrom(const BEZIER &other);


float GetDistFromStart() const {return dist_from_start;}
void ResetDistFromStart() {dist_from_start = 0.0f;}
void ResetDistFromStart() {dist_from_start = 0.0f;}
void ResetNextPatch() {next_patch = NULL;}

///initialize this bezier to the quad defined by the given corner points
Expand Down Expand Up @@ -96,7 +96,7 @@ friend class ROADPATCH;
bool HasRacingline() const
{
return have_racingline;
}
}

private:
///return the bernstein given the normalized coordinate u (zero to one) and an array of four points p
Expand All @@ -113,12 +113,12 @@ friend class ROADPATCH;

///return true if the ray at orig with direction dir intersects the given quadrilateral.
/// also put the collision depth in t and the collision coordinates in u,v
bool IntersectQuadrilateralF(
const MATHVECTOR <float, 3> & orig,
bool IntersectQuadrilateralF(
const MATHVECTOR <float, 3> & orig,
const MATHVECTOR <float, 3> & dir,
const MATHVECTOR <float, 3> & v_00,
const MATHVECTOR <float, 3> & v_00,
const MATHVECTOR <float, 3> & v_10,
const MATHVECTOR <float, 3> & v_11,
const MATHVECTOR <float, 3> & v_11,
const MATHVECTOR <float, 3> & v_01,
float &t, float &u, float &v) const;

Expand Down
62 changes: 31 additions & 31 deletions include/camera.h
@@ -1,41 +1,41 @@
#ifndef _CAMERA_H
#define _CAMERA_H

#include <string>

#include <string>
#include "mathvector.h"
#include "quaternion.h"

#include "quaternion.h"

///base class for a camera
class CAMERA
{
public:
CAMERA(const std::string & camera_name) : name(camera_name)
{

}

const std::string & GetName() const
{
return name;
{
public:
CAMERA(const std::string & camera_name) : name(camera_name)
{

}


const std::string & GetName() const
{
return name;
}

virtual MATHVECTOR <float, 3> GetPosition() const = 0;

virtual QUATERNION <float> GetOrientation() const = 0;

// reset position, orientation
virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

// update position, orientation
virtual void Update(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat, const MATHVECTOR <float, 3> & accel, float dt);

// move relative to current position, orientation
virtual void Move(float dx, float dy, float dz);

// rotate relative to current position, orientation
virtual void Rotate(float up, float left);

protected:

virtual QUATERNION <float> GetOrientation() const = 0;

// reset position, orientation
virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

// update position, orientation
virtual void Update(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat, const MATHVECTOR <float, 3> & accel, float dt);

// move relative to current position, orientation
virtual void Move(float dx, float dy, float dz);

// rotate relative to current position, orientation
virtual void Rotate(float up, float left);

protected:
const std::string name;
};

Expand Down
44 changes: 22 additions & 22 deletions include/camera_chase.h
@@ -1,31 +1,31 @@
#ifndef _CAMERA_CHASE_H
#define _CAMERA_CHASE_H

#include "camera.h"
#ifndef _CAMERA_CHASE_H
#define _CAMERA_CHASE_H

#include "camera.h"

class CAMERA_CHASE : public CAMERA
{
public:
CAMERA_CHASE(const std::string & name);

virtual MATHVECTOR <float, 3> GetPosition() const
{
return position;
CAMERA_CHASE(const std::string & name);

virtual MATHVECTOR <float, 3> GetPosition() const
{
return position;
}

virtual QUATERNION <float> GetOrientation() const
{
return orientation;

virtual QUATERNION <float> GetOrientation() const
{
return orientation;
}

virtual void Reset(const MATHVECTOR <float, 3> & newfocus, const QUATERNION <float> & focus_facing);

virtual void Reset(const MATHVECTOR <float, 3> & newfocus, const QUATERNION <float> & focus_facing);

virtual void Update(const MATHVECTOR <float, 3> & newfocus, const QUATERNION <float> & focus_facing, const MATHVECTOR <float, 3> & accel, float dt);


void SetChaseDistance ( float value )
{
chase_distance = value;
}
}

void SetChaseHeight ( float value )
{
Expand All @@ -35,8 +35,8 @@ class CAMERA_CHASE : public CAMERA
void SetPositionBlending ( bool value )
{
posblend_on = value;
}

}

private:
MATHVECTOR <float, 3> position;
MATHVECTOR <float, 3> focus;
Expand All @@ -49,6 +49,6 @@ class CAMERA_CHASE : public CAMERA
float AngleBetween(MATHVECTOR <float, 3> vec1, MATHVECTOR <float, 3> vec2);

void LookAt(MATHVECTOR <float, 3> eye, MATHVECTOR <float, 3> center, MATHVECTOR <float, 3> up);
};

#endif // _CAMERA_CHASE_H
};

#endif // _CAMERA_CHASE_H
50 changes: 25 additions & 25 deletions include/camera_fixed.h
@@ -1,33 +1,33 @@
#ifndef _CAMERA_FIXED_H
#define _CAMERA_FIXED_H

#include "camera.h"

#ifndef _CAMERA_FIXED_H
#define _CAMERA_FIXED_H

#include "camera.h"

class CAMERA_FIXED : public CAMERA
{
public:
{
public:
CAMERA_FIXED(const std::string & name);

virtual MATHVECTOR <float, 3> GetPosition() const
{
return position;

virtual MATHVECTOR <float, 3> GetPosition() const
{
return position;
}

virtual QUATERNION <float> GetOrientation() const
{
return orientation;
}

virtual QUATERNION <float> GetOrientation() const
{
return orientation;
}

virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

virtual void Update(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat, const MATHVECTOR <float, 3> & accel, float dt);

void SetOffset(float x, float y, float z);
virtual void Update(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat, const MATHVECTOR <float, 3> & accel, float dt);

void SetOffset(float x, float y, float z);

private:
MATHVECTOR <float, 3> position;
MATHVECTOR <float, 3> position;
MATHVECTOR <float, 3> offset;
QUATERNION <float> orientation;
};

#endif // _CAMERA_FIXED_H
};

#endif // _CAMERA_FIXED_H
26 changes: 13 additions & 13 deletions include/camera_free.h
@@ -1,28 +1,28 @@
#ifndef _CAMERA_FREE_H
#define _CAMERA_FREE_H

#include "camera.h"

#ifndef _CAMERA_FREE_H
#define _CAMERA_FREE_H

#include "camera.h"

class CAMERA_FREE : public CAMERA
{
{
public:
CAMERA_FREE(const std::string & name);

virtual MATHVECTOR <float, 3> GetPosition() const;

virtual QUATERNION <float> GetOrientation() const;

virtual QUATERNION <float> GetOrientation() const;

virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

virtual void Rotate(float up, float left);

virtual void Move(float dx, float dy, float dz);
virtual void Move(float dx, float dy, float dz);

private:
MATHVECTOR <float, 3> position;
MATHVECTOR <float, 3> position;
MATHVECTOR <float, 3> offset;
float leftright_rotation;
float updown_rotation;
};

#endif // _CAMERA_FREE_H
};

#endif // _CAMERA_FREE_H
56 changes: 28 additions & 28 deletions include/camera_mount.h
@@ -1,33 +1,33 @@
#ifndef _CAMERA_MOUNT_H
#define _CAMERA_MOUNT_H

#include "camera.h"
#include "rigidbody.h"
#include "random.h"

#ifndef _CAMERA_MOUNT_H
#define _CAMERA_MOUNT_H

#include "camera.h"
#include "rigidbody.h"
#include "random.h"

class CAMERA_MOUNT : public CAMERA
{
public:
CAMERA_MOUNT(const std::string & name);

virtual MATHVECTOR <float, 3> GetPosition() const;
virtual MATHVECTOR <float, 3> GetPosition() const;

virtual QUATERNION <float> GetOrientation() const;
virtual QUATERNION <float> GetOrientation() const;

virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);
virtual void Reset(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newquat);

virtual void Update(const MATHVECTOR <float, 3> & newpos, const QUATERNION <float> & newdir, const MATHVECTOR <float, 3> & accel, float dt);

void SetOffset(MATHVECTOR <float, 3> value)
{
offset = value;
}

void SetRotation(float up, float left)
{
rotation.Rotate(up, 0, 1, 0);
rotation.Rotate(left, 0, 0, 1);
}

void SetOffset(MATHVECTOR <float, 3> value)
{
offset = value;
}

void SetRotation(float up, float left)
{
rotation.Rotate(up, 0, 1, 0);
rotation.Rotate(left, 0, 0, 1);
}

void SetStiffness ( float value )
{
Expand All @@ -37,19 +37,19 @@ class CAMERA_MOUNT : public CAMERA
void SetEffectStrength ( float value )
{
offset_effect_strength = value;
}

}

private:
RIGIDBODY <float> body;
MATHVECTOR <float, 3> anchor;
MATHVECTOR <float, 3> offset; // offset relative car(center of mass)
MATHVECTOR <float, 3> anchor;
MATHVECTOR <float, 3> offset; // offset relative car(center of mass)
QUATERNION<float> rotation; // camera rotation relative to car
float effect;

DETERMINISTICRANDOM randgen;

float stiffness; ///< where 0.0 is nominal stiffness for a sports car and 1.0 is a formula 1 car
float offset_effect_strength; ///< where 1.0 is normal effect strength
};

#endif // _CAMERA_MOUNT_H
};

#endif // _CAMERA_MOUNT_H

0 comments on commit 7d91452

Please sign in to comment.