PPL Logo

cg3d::Planar3d Class Reference

A convex planar polyhedron, with its vertices scattered in 3D. More...

#include <cg3d.h>

Collaboration diagram for cg3d::Planar3d:

Collaboration graph
[legend]

Public Member Functions

 Planar3d (PointSet3d *ps_)
int getPoints (void) const
int getPointIndex (int p) const
const CkVector3dgetPoint (int p) const
void addPoint (int ptIdx)
 Add a new point along our boundary. Points must be presented in order.
void addPoint (int pt0, int pt1, int pt2)
void addPoint (int pt0, int pt1, int pt2, int pt3)
bool addConstraint (int halfspace)
 Clip this shape to lie within this halfspace.

Private Types

enum  { maxPts = 4+2*6 }

Private Attributes

PointSet3dps
int nPts
int pts [maxPts]

Detailed Description

A convex planar polyhedron, with its vertices scattered in 3D.

This typically represents the face of some shape.

The representation is a chain of boundary points, which are split and queried as each halfspace is intersected.

Definition at line 105 of file cg3d.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
maxPts 

Definition at line 107 of file cg3d.h.


Constructor & Destructor Documentation

Planar3d::Planar3d ( PointSet3d ps_  ) 

Definition at line 66 of file cg3d.C.

References nPts, and ps.


Member Function Documentation

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

Definition at line 112 of file cg3d.h.

References nPts.

Referenced by cg3d::Volume3dDest::addFace(), and cg3d::intersect().

Here is the caller graph for this function:

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

Definition at line 113 of file cg3d.h.

References pts.

Referenced by cg3d::intersect().

Here is the caller graph for this function:

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

Definition at line 114 of file cg3d.h.

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

Referenced by addConstraint(), and cg3d::Volume3dDest::addFace().

Here is the call graph for this function:

Here is the caller graph for this function:

void cg3d::Planar3d::addPoint ( int  ptIdx  )  [inline]

Add a new point along our boundary. Points must be presented in order.

Definition at line 118 of file cg3d.h.

References nPts, and pts.

Referenced by cg3d::Tet3d::getFace().

Here is the caller graph for this function:

void cg3d::Planar3d::addPoint ( int  pt0,
int  pt1,
int  pt2 
) [inline]

Definition at line 121 of file cg3d.h.

References nPts, and pts.

void cg3d::Planar3d::addPoint ( int  pt0,
int  pt1,
int  pt2,
int  pt3 
) [inline]

Definition at line 127 of file cg3d.h.

References nPts, and pts.

bool Planar3d::addConstraint ( int  halfspace  ) 

Clip this shape to lie within this halfspace.

Returns false if we are made empty by the intersection.

Returns true if we are made empty by the intersection.

Definition at line 73 of file cg3d.C.

References cg3d::PointSet3d::addPoint(), cg3d::PointSet3d::getHalfspace(), getPoint(), h, CkHalfspace3d::intersectPt(), cg3d::PointSet3d::isOutside(), maxPts, nPts, ps, and pts.

Referenced by cg3d::intersect().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

Definition at line 106 of file cg3d.h.

Referenced by addConstraint(), getPoint(), and Planar3d().

Definition at line 107 of file cg3d.h.

Referenced by addConstraint(), addPoint(), getPoints(), and Planar3d().

int cg3d::Planar3d::pts[maxPts] [private]

Definition at line 108 of file cg3d.h.

Referenced by addConstraint(), addPoint(), getPoint(), and getPointIndex().


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

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