Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

sheep Namespace Reference


Classes

class  AABB2
class  AABB3
class  BS
class  CatmullRomCurve3
class  CustomDistribution
class  CustomDistribution< int >
class  IDE1
 First degree differential equation (DE-1). More...

class  IDE1Solver
 DE-1 solver. More...

class  DE1EulerSolver
 DE-1 solver using the Euler method. More...

class  DE1MidpointSolver
 DE-1 solver using the midpoint method (second order Runge-Kutta). More...

class  DE1RK4Solver
 DE-1 solver using the fourth order Runge-Kutta method. More...

class  Function1
class  ICurve3
class  Matrix
class  Matrix3
class  Matrix4
class  MT19937RNG
struct  OctreeNode
class  Octree
class  Point2
class  Point3
class  Quaternion
class  Vector
class  Vector2
class  Vector3
class  Vector4
class  ASELoader
struct  ASELoader::ExtendedLoadingException
struct  ASELoader::ParsingException
 File structure is broken. More...

struct  ASELoader::look_ahead
struct  ASELoader::look_ahead::m_val_u
struct  ASELoader::material_key
struct  ASELoader::mesh_data
struct  ASELoader::mesh_data::face
 < Structure of a triangular face. More...

class  IMeshBuilder
class  IMeshBuilder::IGeometryBuilder
class  IMeshBuilder::IMaterialBuilder
class  IMeshLoader
struct  IMeshLoader::LoadingException
struct  IMeshLoader::FileNotFoundException
 A resource file is missing. More...

class  KeywordTable
class  MeshModifier
struct  MeshModifier::sub_mesh
struct  MeshModifier::sub_mesh::face
class  OBJLoader
struct  OBJLoader::ExtendedLoadingException
struct  OBJLoader::ParsingException
 File structure is broken. More...

struct  OBJLoader::InvalidFaceException
 An invalid face (with less than 3 vertices) has been encountered. More...

struct  OBJLoader::TriangulationException
class  SmartLoader
struct  SmartLoader::UnknownFileFormatException
 The file format is not supported. More...

class  TRILoader
struct  TRILoader::ExtendedLoadingException
struct  TRILoader::ReadingException
 File structure is broken. More...

class  XXXLoader
class  BinaryStream
struct  BinaryStream::BaseException
struct  BinaryStream::ReadException
struct  BinaryStream::WriteException
struct  BinaryStream::SeekException
class  CommandLineParser
struct  CommandLineParser::ParseException
struct  CommandLineParser::UnknownOptionException
struct  CommandLineParser::InvalidArgumentException
struct  CommandLineParser::MissingArgumentException
struct  CommandLineParser::optspec
class  ConsoleProgressMonitor
class  HTMLStream
class  IClonable
class  ISingleton
class  ITask
class  PentiumRTSC
class  ProgressMonitor
class  StringUtils
struct  StringUtils::ConversionErrorException
class  TaskManager
class  XercesManager
class  XStrHelper
class  XMLConfigFile
struct  XMLConfigFile::LoadErrorException
 This is the base class for all exceptions thrown by the XMLConfigFile class. More...

struct  XMLConfigFile::ParseErrorException
struct  XMLConfigFile::QueryErrorException
class  Contact
class  ContactHandler
class  IForce
class  ITorque
class  ConstantForce
class  ConstantTorque
class  LinearDampingForce
class  LinearDampingTorque
class  Joint
class  SphericalJoint
class  FixedPathJoint
class  FixedPathJoint::DistanceFunction
class  JointManager
class  RCTracker
class  RCTracker::index_set
struct  RCTracker::is_inactivated_rc
class  RigidBody
class  RigidBody::StateVector
class  RigidBody::StateVectorDE
class  Feature
class  ICollisionDetector
class  RigidModel
struct  RigidModel::Face
class  RigidModelBuilder
class  SWIFTCollisionDetector
class  RigidObject
class  Subspace
struct  Subspace::state_snapshot
class  World
class  Arcball
class  IFrameworkApp
class  SceneOrbiter
class  GLMesh
class  GLMesh::SubMesh
struct  GLMesh::SubMesh::Face
class  GLMeshBuilder
class  Color3
class  Material
class  SGNode
class  Texture

Typedefs

typedef double Real
typedef std::basic_ostream<
char > 
htmlstream
typedef std::list< ContactContactList
typedef std::vector< ContactContactVector

Functions

void build_basis (const Vector3 &u, Vector3 *v, Vector3 *w)
Real FindRoot (const Function1 &f, Real left, Real right, Real tolerance)
int itl_bicgstab (const Matrix &a, const Vector &b, Vector *x)
Matrix operator * (Real r, const Matrix &m)
htmlstreamoperator<< (htmlstream &s, const Matrix &m)
 Deprecated.

Matrix3 operator * (Real r, const Matrix3 &m)
htmlstreamoperator<< (htmlstream &s, const Matrix3 &m)
 Deprecated.

Matrix4 operator * (Real r, const Matrix4 &m)
htmlstreamoperator<< (htmlstream &s, const Matrix4 &m)
 Deprecated.

unsigned int choose_next (Real x, Real y, Real z, unsigned int a, unsigned int b, unsigned int c)
Point2operator+= (Point2 &lhs, const Point2 &rhs)
 Basic operations.

Point2operator-= (Point2 &lhs, const Point2 &rhs)
Point2operator *= (Point2 &lhs, Real rhs)
Point2operator/= (Point2 &lhs, Real rhs)
htmlstreamoperator<< (htmlstream &s, const Point2 &p)
 Deprecated.

Point3operator+= (Point3 &lhs, const Point3 &rhs)
 Basic operations.

Point3operator-= (Point3 &lhs, const Point3 &rhs)
Point3operator *= (Point3 &lhs, Real rhs)
Point3operator/= (Point3 &lhs, Real rhs)
htmlstreamoperator<< (htmlstream &s, const Point3 &p)
 Deprecated.

Quaternion operator * (Real r, const Quaternion &q)
 Product of a real by a quaternion.

htmlstreamoperator<< (htmlstream &s, const Quaternion &q)
 Deprecated.

bool feq (Real a, Real b, Real e=EPS)
 Equal: a == b.

bool fneq (Real a, Real b, Real e=EPS)
 Not equal: a != b.

bool fle (Real a, Real b, Real e=EPS)
 Less or equal: a <= b.

bool fge (Real a, Real b, Real e=EPS)
 Greater or equal: a >= b.

bool fz (Real a, Real e=EPS)
 Zero: a == 0.

bool fnz (Real a, Real e=EPS)
 Not zero: a != 0.

template<typename T> T sq (T x)
Real dtor (Real d)
 Convert degrees to radians.

Real rtod (Real r)
 Convert radians to degrees.

Real NormalizeAngle (Real angle)
int NextPowerOfTwo (double x)
sheep::Point2 UniformDiskSampling (sheep::Real xi1, sheep::Real xi2)
 Returns a point chosen uniformly on the surface of the unit disk.

sheep::Point3 UniformSphereSampling (sheep::Real xi1, sheep::Real xi2)
sheep::Point3 UniformHemisphereSampling (sheep::Real xi1, sheep::Real xi2)
sheep::Point3 CosineHemisphereSampling (sheep::Real xi1, sheep::Real xi2)
Vector operator * (Real r, const Vector &v)
 Product of a real by a vector.

htmlstreamoperator<< (htmlstream &s, const Vector &v)
 Deprecated.

Vector2 operator+ (const Vector2 &lhs, const Vector2 &rhs)
 Basic operations.

Vector2 operator- (const Vector2 &lhs, const Vector2 &rhs)
Vector2 operator- (const Vector2 &v)
Vector2 operator * (const Vector2 &lhs, Real rhs)
Vector2 operator * (Real lhs, const Vector2 &rhs)
Vector2 operator/ (const Vector2 &lhs, Real rhs)
Vector2operator+= (Vector2 &lhs, const Vector2 &rhs)
Vector2operator-= (Vector2 &lhs, const Vector2 &rhs)
Vector2operator *= (Vector2 &lhs, Real rhs)
Vector2operator/= (Vector2 &lhs, Real rhs)
Real operator * (const Vector2 &lhs, const Vector2 &rhs)
 Dot product.

htmlstreamoperator<< (htmlstream &s, const Vector2 &v)
 Deprecated.

Vector3 operator+ (const Vector3 &lhs, const Vector3 &rhs)
 Basic operations.

Vector3 operator- (const Vector3 &lhs, const Vector3 &rhs)
Vector3 operator- (const Vector3 &v)
Vector3 operator * (const Vector3 &lhs, Real rhs)
Vector3 operator * (Real lhs, const Vector3 &rhs)
Vector3 operator/ (const Vector3 &lhs, Real rhs)
Vector3operator+= (Vector3 &lhs, const Vector3 &rhs)
Vector3operator-= (Vector3 &lhs, const Vector3 &rhs)
Vector3operator *= (Vector3 &lhs, Real rhs)
Vector3operator/= (Vector3 &lhs, Real rhs)
Real operator * (const Vector3 &lhs, const Vector3 &rhs)
 Dot product.

Vector3 operator^ (const Vector3 &lhs, const Vector3 &rhs)
bool feq (const Vector3 &a, const Vector3 &b, Real e=EPS)
 Equal: a == b.

bool fneq (const Vector3 &a, const Vector3 &b, Real e=EPS)
 Not equal: a != b.

bool fz (const Vector3 &a, Real e=EPS)
 Zero: a == 0.

bool fnz (const Vector3 &a, Real e=EPS)
 Not zero: a != 0.

htmlstreamoperator<< (htmlstream &s, const Vector3 &v)
 Deprecated.

Vector4 operator * (Real r, const Vector4 &v)
 Product of a real by a vector.

htmlstreamoperator<< (htmlstream &s, const Vector4 &v)
 Deprecated.

bool LoadImage (const std::string &filename)
bool TryLoadingImage (const std::string &path, const std::string &filename)
FILE * TryOpeningFile (const std::string &path, const std::string &filename, const char *mode)
template<typename MeshBuilder, typename MeshLoader> std::auto_ptr< typename MeshBuilder::MeshTypeLoadMesh (const std::string &filename, int option_mask=IMeshLoader::DEFAULT_CONFIGURATION_BIT, ProgressMonitor *progmon=0)
bool TriangulatePolygon3 (const std::vector< Point3 > &vertices, std::vector< int > *triangles)
 Triangulates a 3D planar polygon. Returns true if triangulation was successful.

std::string GetApplicationPath ()
htmlstreambr (htmlstream &s)
template<typename T> T * clone (const T *t)
template<typename T> const T & min (const T &a, const T &b, const T &c)
template<typename T> const T & max (const T &a, const T &b, const T &c)
std::string StrX (const XMLCh *const s)
std::ostream & operator<< (std::ostream &target, const XMLCh *const s)
htmlstreamoperator<< (htmlstream &s, const Feature &f)

Variables

const Real EPS = 1.0e-8
const Real PI = 3.1415926535897932
const Real COLLISION_THRESHOLD = 0.05
const Real RESTITUTION_COEFFICIENT = 0.6
const Real HULL_THICKNESS = 0.1
const Real THINK_RATE = 60.0
const Real FRAME_RATE = 60.0
const Real DEFAULT_AZIMUTH = PI / 4.0
const Real DEFAULT_ELEVATION = PI / 4.0
const Real DEFAULT_DISTANCE = 10.0


Typedef Documentation

typedef std::list<Contact> sheep::ContactList
 

Definition at line 70 of file contact.h.

Referenced by sheep::Subspace::find_contacts(), and sheep::SWIFTCollisionDetector::FindContacts().

typedef std::vector<Contact> sheep::ContactVector
 

Definition at line 71 of file contact.h.

Referenced by sheep::Subspace::find_contacts().

typedef std::basic_ostream<char> sheep::htmlstream
 

Definition at line 41 of file htmlstream.h.

Referenced by operator<<().

typedef double sheep::Real
 

Definition at line 34 of file real.h.

Referenced by sheep::JointManager::ApplyContraints(), sheep::Contact::CancelNormalVelocity(), choose_next(), sheep::RCTracker::compute_b_vector(), sheep::RCTracker::compute_forces(), sheep::Subspace::compute_step_end(), sheep::MeshModifier::sub_mesh::ComputeSmoothedVertexNormals(), sheep::MeshModifier::ComputeSmoothedVertexNormals(), sheep::FixedPathJoint::CorrectError(), CosineHemisphereSampling(), sheep::Matrix::Determinant(), sheep::GLMesh::SubMesh::DisplayNormals(), sheep::RCTracker::drive_to_zero(), sheep::FixedPathJoint::DistanceFunction::EvaluateAt(), sheep::RigidBody::EvolveOneStep(), FindRoot(), sheep::FixedPathJoint::GetError(), sheep::SphericalJoint::GetError(), sheep::Octree< const triangle * >::Hit(), itl_bicgstab(), sheep::RCTracker::maxstep(), sheep::Matrix::operator *(), operator *(), operator *=(), operator/(), operator/=(), sheep::MeshModifier::OptimizeMesh(), sheep::MeshModifier::sub_mesh::OptimizeNormals(), sheep::MeshModifier::sub_mesh::OptimizeVertices(), PackDirection(), PackSphericalCoords(), sheep::ASELoader::parse_material(), sheep::Arcball::point_on_sphere(), sheep::FixedPathJoint::project_on_curve(), sheep::ContactHandler::resolve_col_contact(), sheep::RigidBody::RigidBody(), sheep::MeshModifier::SetAmbientColor(), sheep::IMeshBuilder::IMaterialBuilder::SetAmbientColor(), sheep::GLMeshBuilder::SetAmbientColor(), sheep::MeshModifier::SetDiffuseColor(), sheep::IMeshBuilder::IMaterialBuilder::SetDiffuseColor(), sheep::GLMeshBuilder::SetDiffuseColor(), sheep::MeshModifier::SetSpecularColor(), sheep::IMeshBuilder::IMaterialBuilder::SetSpecularColor(), sheep::GLMeshBuilder::SetSpecularColor(), SphericalCoordsToVector(), sheep::Subspace::Step(), sheep::Subspace::step_bodies(), sheep::World::StepBy(), sheep::Octree< const triangle * >::Trace(), sheep::OctreeNode< const triangle * >::Trace(), sheep::SceneOrbiter::track(), sheep::Matrix::Transpose(), sheep::SceneOrbiter::tumble(), UniformDiskSampling(), UniformHemisphereSampling(), UniformSphereSampling(), UnpackDirection(), UnpackSphericalCoords(), sheep::FixedPathJoint::Update(), sheep::Contact::Update(), and VectorToSphericalCoords().


Function Documentation

htmlstream & sheep::br htmlstream &  s  )  [inline]
 

Definition at line 68 of file htmlstream.h.

Referenced by sheep::Subspace::compute_step_end(), sheep::Subspace::find_contacts(), and sheep::Subspace::Step().

void sheep::build_basis const Vector3 u,
Vector3 v,
Vector3 w
[inline]
 

Definition at line 59 of file build_basis.h.

References feq(), fz(), sheep::Vector3::IsUnitLength(), sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

Referenced by ProjectPlanarPolygon3(), and sheep::FixedPathJoint::Update().

unsigned int choose_next Real  x,
Real  y,
Real  z,
unsigned int  a,
unsigned int  b,
unsigned int  c
[inline]
 

Definition at line 38 of file sheep/src/common/math/octree.h.

References Real.

Referenced by sheep::OctreeNode< const triangle * >::Trace().

template<typename T>
T * sheep::clone const T *  t  )  [inline]
 

Definition at line 62 of file iclonable.h.

Referenced by toxic::BasicSurfaceShader::Clone(), and toxic::SceneBuilder::surface_shader_builder().

sheep::Point3 sheep::CosineHemisphereSampling sheep::Real  xi1,
sheep::Real  xi2
[inline]
 

Returns a point chosen with a cosine-weighted distribution on the surface of the unit hemisphere (see above for definition). The vector from the origin to the returned point is unit-length. Note: when doing stratified sampling, there should be 4 times more samples for xi2 than for xi1, since xi2 is used to compute the Phi angle.

Todo:
Turn the multiplication into an addition.

Definition at line 138 of file sampling.h.

References Real.

Referenced by toxic::Renderer::final_gathering().

Real sheep::dtor Real  d  )  [inline]
 

Convert degrees to radians.

Definition at line 130 of file real.h.

References PI.

Referenced by toxic::SceneBuilder::mesh_builder(), toxic::SceneBuilder::pinholecamera_builder(), toxic::SceneBuilder::rotation_builder(), and toxic::SceneBuilder::thinlenscamera_builder().

bool sheep::feq const Vector3 a,
const Vector3 b,
Real  e = EPS
[inline]
 

Equal: a == b.

Definition at line 299 of file vector3.h.

References feq(), sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

Referenced by build_basis(), fge(), fle(), and fneq().

bool sheep::feq Real  a,
Real  b,
Real  e = EPS
[inline]
 

Equal: a == b.

Used to test two floating point numbers to see if they are close enough to be considered equal (not equal, less or equal, greater or equal, zero, not zero). Based on code by Robert Martin (rmartin@rcmcon.com).

Definition at line 89 of file real.h.

Referenced by feq(), sheep::Arcball::point_on_sphere(), and sheep::Contact::Update().

bool sheep::fge Real  a,
Real  b,
Real  e = EPS
[inline]
 

Greater or equal: a >= b.

Definition at line 110 of file real.h.

References feq().

Real sheep::FindRoot const Function1 f,
Real  left,
Real  right,
Real  tolerance
 

Definition at line 30 of file findroot.cpp.

References sheep::Function1::EvaluateAt(), and Real.

Referenced by sheep::FixedPathJoint::project_on_curve().

bool sheep::fle Real  a,
Real  b,
Real  e = EPS
[inline]
 

Less or equal: a <= b.

Definition at line 105 of file real.h.

References feq().

bool sheep::fneq const Vector3 a,
const Vector3 b,
Real  e = EPS
[inline]
 

Not equal: a != b.

Definition at line 307 of file vector3.h.

References fneq(), sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

bool sheep::fneq Real  a,
Real  b,
Real  e = EPS
[inline]
 

Not equal: a != b.

Definition at line 100 of file real.h.

Referenced by fneq().

bool sheep::fnz const Vector3 a,
Real  e = EPS
[inline]
 

Not zero: a != 0.

Definition at line 323 of file vector3.h.

References fnz(), sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

Referenced by toxic::PhotonMap::ApproximateRadiance(), and toxic::PhotonMap::ComputeRadiance().

bool sheep::fnz Real  a,
Real  e = EPS
[inline]
 

Not zero: a != 0.

Definition at line 120 of file real.h.

Referenced by fnz(), sheep::RCTracker::maxstep(), sheep::RigidBody::RigidBody(), and sheep::Contact::Update().

bool sheep::fz const Vector3 a,
Real  e = EPS
[inline]
 

Zero: a == 0.

Definition at line 315 of file vector3.h.

References fz(), sheep::Vector3::m_x, sheep::Vector3::m_y, and sheep::Vector3::m_z.

Referenced by build_basis().

bool sheep::fz Real  a,
Real  e = EPS
[inline]
 

Zero: a == 0.

Definition at line 115 of file real.h.

Referenced by fz().

std::string sheep::GetApplicationPath  ) 
 

Definition at line 30 of file apppath.cpp.

Referenced by get_home_path().

int sheep::itl_bicgstab const Matrix a,
const Vector b,
Vector x
 

Definition at line 49 of file itl_bicgstab.cpp.

References sheep::Matrix::GetColumns(), sheep::Vector::GetDimension(), sheep::Matrix::GetRows(), mtl_matrix, and Real.

Referenced by sheep::JointManager::ApplyContraints().

bool sheep::LoadImage const std::string &  filename  ) 
 

Definition at line 32 of file imeshloader.cpp.

Referenced by toxic::Map2::Map2(), and TryLoadingImage().

template<typename MeshBuilder, typename MeshLoader>
std::auto_ptr<typename MeshBuilder::MeshType> LoadMesh const std::string &  filename,
int  option_mask = IMeshLoader::DEFAULT_CONFIGURATION_BIT,
ProgressMonitor *  progmon = 0
[inline]
 

Todo:
Restore the default value for the MeshLoader parameter.

Definition at line 35 of file loadmesh.h.

template<typename T>
const T & sheep::max const T &  a,
const T &  b,
const T &  c
[inline]
 

Definition at line 68 of file minmax.h.

Referenced by toxic::Collection::Intersect(), toxic::Cube::Intersect(), toxic::Mesh::Intersect(), toxic::Octree::Intersect(), toxic::Ring::Intersect(), sheep::RCTracker::maxstep(), toxic::Framebuffer::Normalize(), toxic::Octree::octree_full_visitor::octree_full_visitor(), and sheep::Octree< const triangle * >::Trace().

template<typename T>
const T & sheep::min const T &  a,
const T &  b,
const T &  c
[inline]
 

Definition at line 63 of file minmax.h.

Referenced by toxic::PhotonMap::BuildPhotonDirectionHistogram(), sheep::BinaryStream::Read(), sheep::Texture::set_texture(), sheep::Octree< const triangle * >::Trace(), and sheep::BinaryStream::Write().

int sheep::NextPowerOfTwo double  x  )  [inline]
 

Returns the smallest integer which can be expressed as a power of two, and which is greatest than x. x must be >= 1.

Definition at line 146 of file real.h.

Referenced by sheep::Texture::set_texture().

Real sheep::NormalizeAngle Real  angle  )  [inline]
 

Expresses a given angle to [0, 2*Pi]. The input and output angles are expressed in radians.

Definition at line 140 of file real.h.

References PI.

Referenced by PackSphericalCoords(), and sheep::SceneOrbiter::tumble().

Vector4 sheep::operator * Real  r,
const Vector4 &  v
[inline]
 

Product of a real by a vector.

Definition at line 278 of file vector4.h.

Real sheep::operator * const Vector3 lhs,
const Vector3 rhs
[inline]
 

Dot product.

Definition at line 283 of file vector3.h.

Vector3 sheep::operator * Real  lhs,
const Vector3 rhs
[inline]
 

Definition at line 227 of file vector3.h.

Vector3 sheep::operator * const Vector3 lhs,
Real  rhs
[inline]
 

Definition at line 219 of file vector3.h.

Real sheep::operator * const Vector2 &  lhs,
const Vector2 &  rhs
[inline]
 

Dot product.

Definition at line 251 of file vector2.h.

Vector2 sheep::operator * Real  lhs,
const Vector2 &  rhs
[inline]
 

Definition at line 205 of file vector2.h.

Vector2 sheep::operator * const Vector2 &  lhs,
Real  rhs
[inline]
 

Definition at line 198 of file vector2.h.

Vector sheep::operator * Real  r,
const Vector v
[inline]
 

Product of a real by a vector.

Definition at line 324 of file vector.h.

Quaternion sheep::operator * Real  r,
const Quaternion &  q
[inline]
 

Product of a real by a quaternion.

Definition at line 260 of file quaternion.h.

Matrix4 sheep::operator * Real  r,
const Matrix4 m
[inline]
 

Definition at line 794 of file matrix4.h.

Matrix3 sheep::operator * Real  r,
const Matrix3 &