Isis 3 Programmer Reference
Isis::ShapeModelFactory Class Reference

This class is used to create ShapeModel objects. More...

#include <ShapeModelFactory.h>

Collaboration diagram for Isis::ShapeModelFactory:
Collaboration graph

Static Public Member Functions

static ShapeModelcreate (Target *target, Pvl &pvl)
 Construct a valid shape model from the given target and contents of kernels group. More...
 

Private Types

enum  {
  Ellipsoid, Isis3EquatorialCylindrical, Isis3Dem, Plane,
  Stack, NaifDSK, Bullet, Embree
}
 

Private Member Functions

 ShapeModelFactory ()
 Constructor is private to avoid instantiating the class. More...
 
 ~ShapeModelFactory ()
 Destructor. More...
 

Detailed Description

This class is used to create ShapeModel objects.

It determines the type of shape model in the input Pvl object and creates the appropriate type of shape model.

Author
2010-07-29 Debbie A. Cook
History:
2012-10-31 - Ken Edmundson - Implemented plane shape
History:
2014-01-14 - Jeannie Backer - Improved error message. Fixes #1957.
History:
2015-03-08 - Jeannie Backer - Added implementation for NAIF DSK models. References #2035.
History:
2017-05-19 Christopher Combs - Modified unitTest.cpp: added ReportError method to truncate paths before data directory. Allows test to pass when not using the default data area. Fixes #4738.
History:
2017-06-08 Makayla Shepherd - Added a cube pointer deletion to fix a memory leak. Fixes #4890.
History:
2017-03-23 Kris Becker - Added support for Embree and Bullet models.
History:
2017-08-04 Kristin Berry - Removed checks for a 'CubeSupported' IsisPreferences Pvl Keyword. ISIS Cube DEMs are not supported by Embree and Bullet at this time.

Definition at line 37 of file ShapeModelFactory.h.

Constructor & Destructor Documentation

◆ ShapeModelFactory()

Isis::ShapeModelFactory::ShapeModelFactory ( )
private

Constructor is private to avoid instantiating the class.

Use the Create method.

Author
2010-01-29 Debbie Cook

Definition at line 42 of file ShapeModelFactory.cpp.

◆ ~ShapeModelFactory()

Isis::ShapeModelFactory::~ShapeModelFactory ( )
private

Destructor.

Definition at line 47 of file ShapeModelFactory.cpp.

Member Function Documentation

◆ create()

ShapeModel * Isis::ShapeModelFactory::create ( Target target,
Pvl pvl 
)
static

Construct a valid shape model from the given target and contents of kernels group.

If the Kernels group does not have a ShapeModel or ElevationModel specified, then the default model is an ellipsoidal shape.

Parameters
targetPointer to target body model.
pvlPvl containing a Kernels group.
Returns
ShapeModel* Pointer to the created ShapeModel object.
Author
2017-03-17 Kris Becker

Definition at line 63 of file ShapeModelFactory.cpp.

References Isis::PvlContainer::addKeyword(), Isis::IException::append(), Isis::FileName::extension(), Isis::PvlObject::findGroup(), Isis::PvlFlatMap::get(), Isis::PvlContainer::hasKeyword(), Isis::Projection::IsEquatorialCylindrical(), Isis::Target::isSky(), Isis::PvlFlatMap::merge(), Isis::Cube::open(), Isis::Cube::projection(), Isis::BulletShapeModel::setTolerance(), Isis::EmbreeShapeModel::setTolerance(), Isis::toDouble(), and Isis::toString().


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