# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CPortal Class Reference

CPortal. More...

#include <portal.h>

List of all members.

Public Methods

 CPortal ()
bool clipPyramid (NLMISC::CVector &observer, std::vector< NLMISC::CPlane > &pyramid)
 Clip the view pyramid (all planes pass through observer point) against the portal. More...

bool isInFront (NLMISC::CVector &v)
 Return true if the vertex v is in front of the portal. More...

void resetClusterLinks ()
 Accessors --------- set all link to clusters to NULL. More...

bool setCluster (CCluster *cluster)
 return false if more than 2 clusters added. More...

uint8 getNbCluster ()
 return the number of clusters linked to the portal. More...

CClustergetCluster (uint pos)
 return the cluster linked to the portal. More...

bool setPoly (const std::vector< NLMISC::CVector > &poly)
 return false if the polygon is not convex. More...

void getPoly (std::vector< NLMISC::CVector > &dest) const
 get this cluster poly in local coordinates. More...

void serial (NLMISC::IStream &f)
 Serial. More...

void setWorldMatrix (const NLMISC::CMatrix &WM)
void setName (std::string &name)
std::string getName ()
void open (bool opened)
bool isOpened ()

Private Attributes

CCluster_Clusters [2]
std::string _Name
bool _Opened
std::vector< NLMISC::CVector_LocalPoly
std::vector< NLMISC::CVector_Poly

Friends

class CInstanceGroup
 Friend class. More...


Detailed Description

CPortal.

Author:
Matthieu Besson , Nevrax France
Date:
2001

Definition at line 54 of file portal.h.


Constructor & Destructor Documentation

NL3D::CPortal::CPortal  
 

Definition at line 46 of file portal.cpp.

References _Clusters, and _Opened.


Member Function Documentation

bool NL3D::CPortal::clipPyramid NLMISC::CVector   observer,
std::vector< NLMISC::CPlane > &    pyramid
 

Clip the view pyramid (all planes pass through observer point) against the portal.

Returns:
false if the pyramid is completly clipped

CCluster* NL3D::CPortal::getCluster uint    pos [inline]
 

return the cluster linked to the portal.

Definition at line 83 of file portal.h.

References _Clusters.

std::string NL3D::CPortal::getName void    [inline]
 

Definition at line 99 of file portal.h.

References _Name.

uint8 NL3D::CPortal::getNbCluster  
 

return the number of clusters linked to the portal.

Definition at line 124 of file portal.cpp.

References _Clusters.

void NL3D::CPortal::getPoly std::vector< NLMISC::CVector > &    dest const
 

get this cluster poly in local coordinates.

Definition at line 177 of file portal.cpp.

References _LocalPoly.

bool NL3D::CPortal::isInFront NLMISC::CVector   v
 

Return true if the vertex v is in front of the portal.

Definition at line 91 of file portal.cpp.

References _Poly, and v.

bool NL3D::CPortal::isOpened   [inline]
 

Definition at line 102 of file portal.h.

References _Opened.

void NL3D::CPortal::open bool    opened [inline]
 

Definition at line 101 of file portal.h.

References _Opened.

void NL3D::CPortal::resetClusterLinks  
 

Accessors --------- set all link to clusters to NULL.

Definition at line 102 of file portal.cpp.

References _Clusters.

void NL3D::CPortal::serial NLMISC::IStream   f
 

Serial.

Definition at line 184 of file portal.cpp.

References _LocalPoly, _Name, _Poly, NLMISC::IStream::isReading, NLMISC::IStream::serial, NLMISC::IStream::serialCont, and NLMISC::IStream::serialVersion.

bool NL3D::CPortal::setCluster CCluster   cluster
 

return false if more than 2 clusters added.

Definition at line 108 of file portal.cpp.

References _Clusters.

void NL3D::CPortal::setName std::string &    name [inline]
 

Definition at line 97 of file portal.h.

References _Name.

bool NL3D::CPortal::setPoly const std::vector< NLMISC::CVector > &    poly
 

return false if the polygon is not convex.

Definition at line 135 of file portal.cpp.

References _LocalPoly, _Poly, and PORTALPRECISION.

void NL3D::CPortal::setWorldMatrix const NLMISC::CMatrix   WM
 

Definition at line 195 of file portal.cpp.

References _LocalPoly, and _Poly.


Friends And Related Function Documentation

friend class CInstanceGroup [friend]
 

Friend class.

Definition at line 115 of file portal.h.


Member Data Documentation

CCluster* NL3D::CPortal::_Clusters[2] [private]
 

Definition at line 106 of file portal.h.

Referenced by CPortal, getCluster, getNbCluster, resetClusterLinks, and setCluster.

std::vector<NLMISC::CVector> NL3D::CPortal::_LocalPoly [private]
 

Definition at line 111 of file portal.h.

Referenced by getPoly, serial, setPoly, and setWorldMatrix.

std::string NL3D::CPortal::_Name [private]
 

Definition at line 108 of file portal.h.

Referenced by getName, serial, and setName.

bool NL3D::CPortal::_Opened [private]
 

Definition at line 109 of file portal.h.

Referenced by CPortal, isOpened, and open.

std::vector<NLMISC::CVector> NL3D::CPortal::_Poly [private]
 

Definition at line 112 of file portal.h.

Referenced by isInFront, serial, setPoly, and setWorldMatrix.


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