Ignore:
Timestamp:
07/06/20 23:39:36 (4 years ago)
Author:
Maciej Komosinski
Message:

Renamed functions for consistency; added an example of using getSupportedShapeTypes() and getSupportedJointShapes()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/modelparts.cpp

    r975 r977  
    107107        preflocation(_preflocation),
    108108        supported_shape_types(sup_shapes),
     109        supported_joint_shapes(sup_joints),
    109110        vectordata(_vectordata),
    110111        visualhints(vhints), impl_count(0),/*impl(0),*/active(1), genactive(0)
     
    624625}
    625626
     627const char* Part::getShapeName(Shape sh)
     628{
     629        switch (sh)
     630        {
     631        case SHAPE_BALL_AND_STICK: return "ball-and-stick";
     632        case SHAPE_ELLIPSOID: return "ellipsoid";
     633        case SHAPE_CUBOID: return "cuboid";
     634        case SHAPE_CYLINDER: return "cylinder";
     635
     636        default:
     637                return "unknown shape";
     638        }
     639}
    626640
    627641///////////////////////////
     
    709723}
    710724
     725const char* Joint::getShapeName(Shape sh)
     726{
     727        switch (sh)
     728        {
     729        case SHAPE_BALL_AND_STICK: return "ball-and-stick";
     730        case SHAPE_FIXED: return "fixed";
     731        case SHAPE_HINGE_X: return "hinge x";
     732        case SHAPE_HINGE_XY: return "hinge xy";
     733
     734        default:
     735                return "unknown shape";
     736        }
     737}
     738
     739
    711740/////////////////////////////////////////////////////////////////
    712741
Note: See TracChangeset for help on using the changeset viewer.