PPL Logo

cg3d::Shape3d Class Reference

A convex 3D shape, described either as a set of convex planar faces or the intersection of a set of halfspaces. More...

#include <cg3d.h>

Inheritance diagram for cg3d::Shape3d:

Inheritance graph
[legend]
Collaboration diagram for cg3d::Shape3d:

Collaboration graph
[legend]

Public Member Functions

 Shape3d (PointSet3d *ps_, int nFaces_, int nPoints_, const int *halfspaces_, const int *points_)
virtual ~Shape3d ()
PointSet3dgetSet (void) const
int getFaces (void) const
int getPoints (void) const
int getPointIndex (int p) const
 Get this point on the boundary of the shape.
const CkVector3dgetPoint (int p) const
int getHalfspaceIndex (int f) const
 Extract the halfspace of face f of this shape.
const CkHalfspace3dgetHalfspace (int f) const
virtual void getFace (int f, Planar3d &face) const =0
 Extract the boundary of face f of this shape.
bool contains (const CkVector3d &pt) const
 Return true if this shape fully contains this point.

Protected Attributes

PointSet3dps

Private Attributes

int nFaces
int nPoints
const inthalfspaces
const intpoints

Detailed Description

A convex 3D shape, described either as a set of convex planar faces or the intersection of a set of halfspaces.

Definition at line 145 of file cg3d.h.


Constructor & Destructor Documentation

cg3d::Shape3d::Shape3d ( PointSet3d ps_,
int  nFaces_,
int  nPoints_,
const int halfspaces_,
const int points_ 
) [inline]

Definition at line 153 of file cg3d.h.

Shape3d::~Shape3d (  )  [virtual]

Definition at line 127 of file cg3d.C.


Member Function Documentation

PointSet3d* cg3d::Shape3d::getSet ( void   )  const [inline]

Definition at line 159 of file cg3d.h.

References ps.

Referenced by cg3d::testShape().

Here is the caller graph for this function:

int cg3d::Shape3d::getFaces ( void   )  const [inline]

Definition at line 161 of file cg3d.h.

References nFaces.

Referenced by contains(), earlyExit(), cg3d::intersect(), and cg3d::testShape().

Here is the caller graph for this function:

int cg3d::Shape3d::getPoints ( void   )  const [inline]

Definition at line 162 of file cg3d.h.

References nPoints.

Referenced by earlyExit(), and cg3d::testShape().

Here is the caller graph for this function:

int cg3d::Shape3d::getPointIndex ( int  p  )  const [inline]

Get this point on the boundary of the shape.

The return value is suitable for passing to PointSet3d::getPoint.

Definition at line 168 of file cg3d.h.

References points.

Referenced by earlyExit(), getPoint(), and test_vol_mgc().

Here is the caller graph for this function:

const CkVector3d& cg3d::Shape3d::getPoint ( int  p  )  const [inline]

Definition at line 169 of file cg3d.h.

References cg3d::PointSet3d::getPoint(), getPointIndex(), and ps.

Referenced by cg3d::testShape().

Here is the call graph for this function:

Here is the caller graph for this function:

int cg3d::Shape3d::getHalfspaceIndex ( int  f  )  const [inline]

Extract the halfspace of face f of this shape.

The halfspace normal should point into the shape's interior. The return value is suitable for passing to PointSet3d::getHalfspace.

Definition at line 177 of file cg3d.h.

References halfspaces.

Referenced by contains(), earlyExit(), getHalfspace(), and cg3d::intersect().

Here is the caller graph for this function:

const CkHalfspace3d& cg3d::Shape3d::getHalfspace ( int  f  )  const [inline]

Definition at line 178 of file cg3d.h.

References cg3d::PointSet3d::getHalfspace(), getHalfspaceIndex(), and ps.

Referenced by test_vol_planes(), and cg3d::testShape().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void cg3d::Shape3d::getFace ( int  f,
Planar3d face 
) const [pure virtual]

Extract the boundary of face f of this shape.

Points in face should spiral right-handed around plane normal.

Implemented in cg3d::Tet3d.

Referenced by cg3d::intersect(), and cg3d::testShape().

Here is the caller graph for this function:

bool Shape3d::contains ( const CkVector3d pt  )  const

Return true if this shape fully contains this point.

Works by enumerating the shape's halfspaces.

Works by enumerating the shape's halfspaces.

Definition at line 131 of file cg3d.C.

References getFaces(), getHalfspaceIndex(), cg3d::PointSet3d::isInside(), and ps.

Here is the call graph for this function:


Field Documentation

Definition at line 147 of file cg3d.h.

Referenced by contains(), earlyExit(), getHalfspace(), getPoint(), getSet(), and cg3d::Tet3d::Tet3d().

Definition at line 149 of file cg3d.h.

Referenced by getFaces().

Definition at line 149 of file cg3d.h.

Referenced by getPoints().

const int* cg3d::Shape3d::halfspaces [private]

Definition at line 150 of file cg3d.h.

Referenced by getHalfspaceIndex().

const int* cg3d::Shape3d::points [private]

Definition at line 151 of file cg3d.h.

Referenced by getPointIndex().


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

Generated on Mon Sep 21 08:33:31 2020 for Charm++ by  doxygen 1.5.5