cgma
|
#include <PartitionPoint.hpp>
Definition at line 10 of file PartitionPoint.hpp.
PartitionPoint::PartitionPoint | ( | const CubitVector & | position, |
PartitionEntity * | owner | ||
) |
Definition at line 11 of file PartitionPoint.cpp.
: firstCurve(0), curveCount(0), myPosition( position ), facetPoint(0) { owner->sub_entity_set().add_lower_order( this ); }
PartitionPoint::PartitionPoint | ( | const CubitSimpleAttrib & | attrib, |
PartitionEntity * | owner | ||
) |
Definition at line 27 of file PartitionPoint.cpp.
: firstCurve(0), curveCount(0), facetPoint(0) { DLIList<int> junk; DLIList<CubitVector*> pt; owner->sub_entity_set().add_lower_order( this, attrib, 0, pt, junk, junk, junk); assert(pt.size() == 1); myPosition = *pt.get(); delete pt.get(); }
PartitionPoint::PartitionPoint | ( | TBPoint * | real_point | ) |
Definition at line 18 of file PartitionPoint.cpp.
: firstCurve(0), curveCount(0), myPosition( real_point->coordinates() ), facetPoint(0) { assert( dynamic_cast<SubEntitySet*>(real_point->owner()) == 0 ); new SubEntitySet( real_point, this ); }
Definition at line 40 of file PartitionPoint.cpp.
{ while( firstCurve ) { PartitionCurve* curve = firstCurve; if( curve->start_point() == this ) curve->start_point(0); if( curve->end_point() == this ) curve->end_point(0); assert( firstCurve != curve ); } assert( curveCount == 0 ); facet_point(0); }
void PartitionPoint::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | csa | ) | [virtual] |
Implements TopologyBridge.
Definition at line 162 of file PartitionPoint.cpp.
{ sub_entity_set().add_attribute( this, csa ); }
CubitBox PartitionPoint::bounding_box | ( | void | ) | const [virtual] |
Reimplemented from TBPoint.
Definition at line 211 of file PartitionPoint.cpp.
{ return CubitBox(coordinates()); }
PartitionCurve * PartitionPoint::common_curve | ( | PartitionPoint * | other | ) | const |
Definition at line 69 of file PartitionPoint.cpp.
{ PartitionCurve* curve = 0; if( other == this ) { while( (curve = next_curve(curve)) ) if( curve->start_point() == curve->end_point() ) return curve; } else { while( (curve = next_curve(curve)) ) if( curve->other_point(other) ) return curve; } return 0; }
CubitVector PartitionPoint::coordinates | ( | void | ) | const [virtual] |
CubitPointData* PartitionPoint::facet_point | ( | ) | const [inline] |
Definition at line 54 of file PartitionPoint.hpp.
{ return facetPoint; }
void PartitionPoint::facet_point | ( | CubitPointData * | set | ) |
Definition at line 186 of file PartitionPoint.cpp.
{ if( facetPoint ) TDVGFacetOwner::remove(facetPoint); facetPoint = set; if( set ) { assert((set->coordinates() - coordinates()).length_squared() < GEOMETRY_RESABS*GEOMETRY_RESABS); TDVGFacetOwner::set(facetPoint,this); } }
void PartitionPoint::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [virtual] |
GeometryQueryEngine * PartitionPoint::get_geometry_query_engine | ( | ) | const [virtual] |
Implements TopologyBridge.
Definition at line 127 of file PartitionPoint.cpp.
{ return VirtualQueryEngine::instance(); }
void PartitionPoint::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [virtual] |
Implements TopologyBridge.
Definition at line 96 of file PartitionPoint.cpp.
{ parents.clean_out(); if( real_point() ) { // Get all the real point's parent curves. sub_entity_set().get_entity()->get_parents_virt( parents ); // Remove all real parents hidden by partitions. We will add // the partitions hiding these curves later. for( int i = parents.size(); i--; ) if( dynamic_cast<SubEntitySet*>(parents.step_and_get()->owner() ) ) parents.change_to(0); parents.remove_all_with_value(0); } // Now add any parent partition curves for( PartitionCurve* curve = firstCurve; curve; curve = curve->next_curve(this) ) parents.append( curve ); }
CubitStatus PartitionPoint::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | list | ) | [virtual] |
Implements TopologyBridge.
Definition at line 168 of file PartitionPoint.cpp.
{ sub_entity_set().get_attributes( this, list ); return CUBIT_SUCCESS; }
CubitStatus PartitionPoint::get_simple_attribute | ( | const CubitString & | name, |
DLIList< CubitSimpleAttrib > & | list | ||
) | [virtual] |
Implements TopologyBridge.
Definition at line 173 of file PartitionPoint.cpp.
{ sub_entity_set().get_attributes( this, name.c_str(), list ); return CUBIT_SUCCESS; }
int PartitionPoint::layer | ( | ) | const [inline, virtual] |
Reimplemented from TopologyBridge.
Definition at line 40 of file PartitionPoint.hpp.
{ return sub_entity_set().get_owner_layer(); }
CubitStatus PartitionPoint::move | ( | CubitVector & | delta | ) |
Definition at line 87 of file PartitionPoint.cpp.
{ //if( curveSet.size() ) return CUBIT_FAILURE; //myPosition += delta; //return CUBIT_SUCCESS; }
CubitStatus PartitionPoint::move_to_geometry | ( | CubitVector & | pos | ) | [virtual] |
Reimplemented from PartitionEntity.
Definition at line 214 of file PartitionPoint.cpp.
{ pos = coordinates(); return CUBIT_SUCCESS; }
PartitionCurve * PartitionPoint::next_curve | ( | PartitionCurve * | prev = 0 | ) | const |
Definition at line 66 of file PartitionPoint.cpp.
{ return prev ? prev->next_curve(this) : firstCurve; }
void PartitionPoint::notify_split | ( | FacetEntity * | , |
FacetEntity * | |||
) | [virtual] |
int PartitionPoint::num_curves | ( | ) | const [inline] |
Definition at line 70 of file PartitionPoint.hpp.
{ return curveCount; }
void PartitionPoint::print_debug_info | ( | const char * | prefix = 0 , |
bool | print_subentity_set = true |
||
) | const [virtual] |
Reimplemented from PartitionEntity.
Definition at line 132 of file PartitionPoint.cpp.
{ if( !prefix ) prefix = ""; char* new_prefix = new char[strlen(prefix)+3]; strcpy( new_prefix, prefix ); strcat( new_prefix, " "); CubitVector p = coordinates(); PRINT_INFO("%sPartitionPoint %p at (%f,%f,%f)\n", prefix, (void*)this, p.x(), p.y(), p.z() ); DLIList<Curve*> curve_list; const_cast<PartitionPoint*>(this)->TopologyBridge::curves( curve_list ); PRINT_INFO("%s %d Curves (%d PartitionCurves).\n", prefix, curve_list.size(), num_curves() ); if ( facet_point() ) { p = facet_point()->coordinates(); PRINT_INFO("%s CubitPoint %p at [%f,%f,%f] (%f)\n", prefix, (void*)facet_point(), p.x(), p.y(), p.z(), (coordinates() - facet_point()->coordinates()).length()); } if( ent_set ) sub_entity_set().print_debug_info( new_prefix ); else print_partitioned_entity(new_prefix); delete [] new_prefix; }
TBPoint * PartitionPoint::real_point | ( | ) | const |
Definition at line 122 of file PartitionPoint.cpp.
{ return dynamic_cast<TBPoint*>(sub_entity_set().get_entity()); }
void PartitionPoint::remove_all_simple_attribute_virt | ( | ) | [virtual] |
Implements TopologyBridge.
Definition at line 166 of file PartitionPoint.cpp.
{ sub_entity_set().rem_all_attrib( this ); }
void PartitionPoint::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | csa | ) | [virtual] |
Implements TopologyBridge.
Definition at line 164 of file PartitionPoint.cpp.
{ sub_entity_set().rem_attribute( this, csa ); }
void PartitionPoint::reverse_sense | ( | ) | [virtual] |
CubitStatus PartitionPoint::save | ( | CubitSimpleAttrib & | attrib | ) | [virtual] |
Implements PartitionEntity.
Definition at line 199 of file PartitionPoint.cpp.
{ int id = sub_entity_set().get_id(this); if( id <= 0 ) return CUBIT_FAILURE; DLIList<CubitVector*> pt_list(1); pt_list.append( new CubitVector(coordinates()) ); return sub_entity_set().save_geometry( id, 0, &pt_list, 0, 0, 0, attrib ); }
void PartitionPoint::transform | ( | const CubitTransformMatrix & | xform | ) | [virtual] |
Implements PartitionEntity.
Definition at line 220 of file PartitionPoint.cpp.
{ if( TBPoint* point = dynamic_cast<TBPoint*>(partitioned_entity()) ) myPosition = point->coordinates(); else myPosition = xform * myPosition; if( facetPoint ) facetPoint->set(myPosition); }
friend class PartitionCurve [friend] |
Definition at line 13 of file PartitionPoint.hpp.
int PartitionPoint::curveCount [private] |
Definition at line 64 of file PartitionPoint.hpp.
CubitPointData* PartitionPoint::facetPoint [private] |
Definition at line 67 of file PartitionPoint.hpp.
PartitionCurve* PartitionPoint::firstCurve [private] |
Definition at line 63 of file PartitionPoint.hpp.
CubitVector PartitionPoint::myPosition [private] |
Definition at line 66 of file PartitionPoint.hpp.