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

ADFSampleAddress Class Reference

#include <adf.h>

List of all members.


Detailed Description

An ADF Sample Address.

Generally this is only used for manipulation and maintenance of the address as an ADF is traversed.

Definition at line 47 of file adf.h.

Public Member Functions

void adjust_for_child (int depth, int child)
 Samples in the center of one of the eight child cells.

void adjust_for_corner_sample (int depth, int corner)
 Given the address for a cell, adjust the address so it points to the given sample of the cell.

void adjust_for_sample (int depth, int sample)
 Given the address for a cell, adjust the address so it points to the given sample of the cell.

void adjust_coordinate (int coord, int delta, int depth)
void set_to_root ()
 Root is at half the distance across the octree.

double coord_to_point (ADF *adfp, int coord) const
 Converts sample address to its spatial coordinats.

void to_point (ADF *adfp, gmVector3 &ret) const
 Converts address to coordinates.

const ADFSampleAddressoperator= (const ADFSampleAddress &a)
bool operator== (const ADFSampleAddress &a) const

Public Attributes

unsigned short address [3]
 The x, y, and z components of the address.


Member Function Documentation

void ADFSampleAddress::adjust_coordinate int  coord,
int  delta,
int  depth
 

Definition at line 387 of file adf.cpp.

References address.

Referenced by adjust_for_child(), adjust_for_corner_sample(), and adjust_for_sample().

void ADFSampleAddress::adjust_for_child int  depth,
int  child
 

Samples in the center of one of the eight child cells.

Definition at line 468 of file adf.cpp.

References adjust_coordinate(), and octree_child_center_offset_ints.

Referenced by ADF::init_traversal_node().

void ADFSampleAddress::adjust_for_corner_sample int  depth,
int  corner
 

Given the address for a cell, adjust the address so it points to the given sample of the cell.

Depth is depth of current cell. Sample is a number from 0 to 8 (same labeling as children). Sampling occurs at (center of) vertices.

Definition at line 453 of file adf.cpp.

References adjust_coordinate(), and octree_child_center_offset_ints.

Referenced by ADFTraversalNode::extract_samples_from(), and ADFPruner::is_used().

void ADFSampleAddress::adjust_for_sample int  depth,
int  sample
 

Given the address for a cell, adjust the address so it points to the given sample of the cell.

Depth is depth of current cell. Sample is a number from 0 to 19 (same labeling as samples). Sampling occurs at center of each cell, faces, edges (total 19).

Definition at line 435 of file adf.cpp.

References ADF_sample_address_offset, and adjust_coordinate().

Referenced by ADFTraversalNode::is_reconstruction_valid().

double ADFSampleAddress::coord_to_point ADF adfp,
int  coord
const
 

Converts sample address to its spatial coordinats.

Parameters:
adfp Pointer to an ADF object
coord Coordinate to be converted (0=x, 1=y, 2=z) Helper for to_point.

Definition at line 485 of file adf.cpp.

References address, Octree::center, Octree::length, and ADF::length_table.

Referenced by to_point().

const ADFSampleAddress& ADFSampleAddress::operator= const ADFSampleAddress a  )  [inline]
 

Definition at line 60 of file adf.h.

References address.

bool ADFSampleAddress::operator== const ADFSampleAddress a  )  const [inline]
 

Definition at line 68 of file adf.h.

References address.

void ADFSampleAddress::set_to_root  ) 
 

Root is at half the distance across the octree.

So the root of the octree is at 0x4000.

|--------| 0x8000 |----| 0x4000 |--| 0x2000 |-| 0x1000 ...

Definition at line 418 of file adf.cpp.

References address.

Referenced by ADF::createADF(), and ADF::init_traversal_node().

void ADFSampleAddress::to_point ADF adfp,
gmVector3 &  ret
const
 

Converts address to coordinates.

Definition at line 500 of file adf.cpp.

References coord_to_point().

Referenced by ADF::get_sample().


Member Data Documentation

unsigned short ADFSampleAddress::address[3]
 

The x, y, and z components of the address.

Definition at line 79 of file adf.h.

Referenced by adjust_coordinate(), coord_to_point(), ADFSampleMap::operator()(), ADFSampleSet::operator()(), ADFSampleHasher::operator()(), operator=(), operator==(), and set_to_root().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:01:58 2004 for Advanced Surface Library by doxygen 1.3.4