本文整理汇总了C++中PropertyBag::getVec3方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyBag::getVec3方法的具体用法?C++ PropertyBag::getVec3怎么用?C++ PropertyBag::getVec3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyBag
的用法示例。
在下文中一共展示了PropertyBag::getVec3方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void ActorSet::load(const PropertyBag &objects, World *_world)
{
ASSERT(_world!=0, "world was null");
world = _world;
for(size_t i=0, n=objects.getNumInstances("object"); i<n; ++i)
{
const tuple<OBJECT_ID, ActorPtr> t = create();
const ActorPtr object = t.get<1>();
const PropertyBag decl = objects.getBag("object", i);
const FileName templateFile = decl.getFileName("template");
const vec3 initialPosition = decl.getVec3("position");
const PropertyBag templateData = PropertyBag::fromFile(templateFile);
const PropertyBag base = templateData.getBag("components");
ComponentDataSet s = ComponentDataSet::load(base, decl);
// get actor name
object->actorName = "(no name)";
templateData.get("name", object->actorName);
object->load(s, initialPosition, vec3(0,0,0), world);
object->setParentBlackBoard(this);
}
}
示例2: load
void ComponentGate::load(const PropertyBag &data)
{
resetMembers();
state = ("a" == toLowerCase(data.getString("initialState")))
? STATE_A
: STATE_B;
positionA = data.getVec3("positionA");
positionB = data.getVec3("positionB");
timeToTransitionAB = data.getFloat("timeToTransitionAB");
timeToTransitionBA = data.getFloat("timeToTransitionBA");
}