本文整理汇总了C++中OrderedTaskPoint::GetObservationZone方法的典型用法代码示例。如果您正苦于以下问题:C++ OrderedTaskPoint::GetObservationZone方法的具体用法?C++ OrderedTaskPoint::GetObservationZone怎么用?C++ OrderedTaskPoint::GetObservationZone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderedTaskPoint
的用法示例。
在下文中一共展示了OrderedTaskPoint::GetObservationZone方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWaypoint
bool
OrderedTaskPoint::Equals(const OrderedTaskPoint &other) const
{
return GetWaypoint() == other.GetWaypoint() &&
GetType() == other.GetType() &&
GetObservationZone().Equals(other.GetObservationZone()) &&
other.GetObservationZone().Equals(GetObservationZone());
}
示例2:
inline void
TaskPointRenderer::DrawOZForeground(const OrderedTaskPoint &tp, int offset)
{
ozv.Draw(canvas, OZRenderer::LAYER_INACTIVE, m_proj, tp.GetObservationZone(),
offset);
ozv.Draw(canvas, OZRenderer::LAYER_ACTIVE, m_proj, tp.GetObservationZone(),
offset);
}
示例3:
void
TaskPointRenderer::DrawOZForeground(const OrderedTaskPoint &tp)
{
int offset = index - active_index;
if (mode_optional_start)
offset = -1; // render optional starts as deactivated
ozv.Draw(canvas, OZRenderer::LAYER_INACTIVE, m_proj, tp.GetObservationZone(),
offset);
ozv.Draw(canvas, OZRenderer::LAYER_ACTIVE, m_proj, tp.GetObservationZone(),
offset);
}
示例4: return
gcc_pure
static unsigned
get_radius(const OrderedTaskPoint &tp)
{
const CylinderZone &oz = (const CylinderZone &)tp.GetObservationZone();
return (unsigned)oz.GetRadius();
}
示例5: wser
void
Serialiser::Serialise(const OrderedTaskPoint &data, const TCHAR* name)
{
// do nothing
std::unique_ptr<DataNode> child(node.AppendChild(_T("Point")));
child->SetAttribute(_T("type"), name);
std::unique_ptr<DataNode> wchild(child->AppendChild(_T("Waypoint")));
Serialiser wser(*wchild);
wser.Serialise(data.GetWaypoint());
std::unique_ptr<DataNode> ochild(child->AppendChild(_T("ObservationZone")));
Serialiser oser(*ochild);
oser.Serialise(data.GetObservationZone());
}
示例6: switch
gcc_pure
static Declaration::TurnPoint::Shape
get_shape(const OrderedTaskPoint &tp)
{
const ObservationZonePoint &oz = tp.GetObservationZone();
switch (oz.GetShape()) {
case ObservationZonePoint::LINE:
return Declaration::TurnPoint::LINE;
case ObservationZonePoint::CYLINDER:
return Declaration::TurnPoint::CYLINDER;
default:
return Declaration::TurnPoint::SECTOR;
}
}
示例7: child
static void
Serialise(WritableDataNode &node, const OrderedTaskPoint &data,
const TCHAR *name)
{
// do nothing
std::unique_ptr<WritableDataNode> child(node.AppendChild(_T("Point")));
child->SetAttribute(_T("type"), name);
std::unique_ptr<WritableDataNode> wchild(child->AppendChild(_T("Waypoint")));
Serialise(*wchild, data.GetWaypoint());
std::unique_ptr<WritableDataNode> ochild(child->AppendChild(_T("ObservationZone")));
Serialise(*ochild, data.GetObservationZone());
if (data.GetType() == TaskPointType::AST) {
const ASTPoint &ast = (const ASTPoint &)data;
if (ast.GetScoreExit())
child->SetAttribute(_T("score_exit"), true);
}
}
示例8: GetRadius
gcc_pure
static double
GetRadius(const OrderedTaskPoint &tp)
{
return GetRadius(tp.GetObservationZone());
}
示例9: test_task_aat
bool test_task_aat(TaskManager& task_manager,
const Waypoints &waypoints)
{
task_manager.SetFactory(TaskFactoryType::AAT);
AbstractTaskFactory &fact = task_manager.GetFactory();
const Waypoint *wp;
task_report(task_manager, "# adding start\n");
wp = waypoints.LookupId(1);
if (wp) {
OrderedTaskPoint *tp = fact.CreateStart(*wp);
if (!fact.Append(*tp,false)) {
return false;
}
delete tp;
}
task_manager.SetActiveTaskPoint(0);
task_manager.Resume();
task_report(task_manager, "# adding intermediate\n");
wp = waypoints.LookupId(2);
if (wp) {
OrderedTaskPoint* tp = fact.CreateIntermediate(TaskPointFactoryType::AAT_CYLINDER,*wp);
if (tp->GetObservationZone().GetShape() == ObservationZone::Shape::CYLINDER) {
CylinderZone &cz = (CylinderZone &)tp->GetObservationZone();
cz.SetRadius(fixed(30000.0));
}
if (!fact.Append(*tp,false)) {
return false;
}
delete tp;
}
task_report(task_manager, "# adding intermediate\n");
wp = waypoints.LookupId(3);
if (wp) {
OrderedTaskPoint* tp = fact.CreateIntermediate(TaskPointFactoryType::AAT_CYLINDER,*wp);
if (tp->GetObservationZone().GetShape() == ObservationZone::Shape::CYLINDER) {
CylinderZone &cz = (CylinderZone &)tp->GetObservationZone();
cz.SetRadius(fixed(40000.0));
}
if (!fact.Append(*tp,false)) {
return false;
}
delete tp;
}
task_report(task_manager, "# adding finish\n");
wp = waypoints.LookupId(1);
if (wp) {
OrderedTaskPoint *tp = fact.CreateFinish(*wp);
if (!fact.Append(*tp,false)) {
return false;
}
delete tp;
}
fact.UpdateStatsGeometry();
task_report(task_manager, "# checking task..\n");
if (!fact.Validate()) {
return false;
}
if (!task_manager.CheckOrderedTask()) {
return false;
}
return true;
}
示例10: GetRadius
static fixed
GetRadius(const OrderedTaskPoint &tp)
{
return GetRadius(tp.GetObservationZone());
}
示例11: switch
TaskPointFactoryType
AbstractTaskFactory::GetType(const OrderedTaskPoint &point) const
{
const ObservationZonePoint &oz = point.GetObservationZone();
switch (point.GetType()) {
case TaskPointType::START:
switch (oz.GetShape()) {
case ObservationZone::Shape::FAI_SECTOR:
case ObservationZone::Shape::SYMMETRIC_QUADRANT:
return TaskPointFactoryType::START_SECTOR;
case ObservationZone::Shape::LINE:
return TaskPointFactoryType::START_LINE;
case ObservationZone::Shape::CYLINDER:
case ObservationZone::Shape::MAT_CYLINDER:
case ObservationZone::Shape::SECTOR:
case ObservationZone::Shape::DAEC_KEYHOLE:
case ObservationZone::Shape::CUSTOM_KEYHOLE:
case ObservationZone::Shape::BGAFIXEDCOURSE:
case ObservationZone::Shape::BGAENHANCEDOPTION:
case ObservationZone::Shape::ANNULAR_SECTOR:
return TaskPointFactoryType::START_CYLINDER;
case ObservationZone::Shape::BGA_START:
return TaskPointFactoryType::START_BGA;
}
break;
case TaskPointType::AAT:
switch (oz.GetShape()) {
case ObservationZone::Shape::SECTOR:
case ObservationZone::Shape::FAI_SECTOR:
case ObservationZone::Shape::SYMMETRIC_QUADRANT:
case ObservationZone::Shape::DAEC_KEYHOLE:
case ObservationZone::Shape::BGAFIXEDCOURSE:
case ObservationZone::Shape::BGAENHANCEDOPTION:
case ObservationZone::Shape::BGA_START:
case ObservationZone::Shape::LINE:
return TaskPointFactoryType::AAT_SEGMENT;
case ObservationZone::Shape::ANNULAR_SECTOR:
return TaskPointFactoryType::AAT_ANNULAR_SECTOR;
case ObservationZone::Shape::CYLINDER:
return TaskPointFactoryType::AAT_CYLINDER;
case ObservationZone::Shape::CUSTOM_KEYHOLE:
return TaskPointFactoryType::AAT_KEYHOLE;
case ObservationZone::Shape::MAT_CYLINDER:
return TaskPointFactoryType::MAT_CYLINDER;
}
break;
case TaskPointType::AST:
switch (oz.GetShape()) {
case ObservationZone::Shape::FAI_SECTOR:
return TaskPointFactoryType::FAI_SECTOR;
case ObservationZone::Shape::DAEC_KEYHOLE:
case ObservationZone::Shape::CUSTOM_KEYHOLE:
return TaskPointFactoryType::KEYHOLE_SECTOR;
case ObservationZone::Shape::BGAFIXEDCOURSE:
return TaskPointFactoryType::BGAFIXEDCOURSE_SECTOR;
case ObservationZone::Shape::BGAENHANCEDOPTION:
return TaskPointFactoryType::BGAENHANCEDOPTION_SECTOR;
case ObservationZone::Shape::BGA_START:
case ObservationZone::Shape::CYLINDER:
case ObservationZone::Shape::MAT_CYLINDER:
case ObservationZone::Shape::SECTOR:
case ObservationZone::Shape::LINE:
case ObservationZone::Shape::ANNULAR_SECTOR:
return TaskPointFactoryType::AST_CYLINDER;
case ObservationZone::Shape::SYMMETRIC_QUADRANT:
return TaskPointFactoryType::SYMMETRIC_QUADRANT;
}
break;
case TaskPointType::FINISH:
switch (oz.GetShape()) {
case ObservationZone::Shape::BGA_START:
case ObservationZone::Shape::FAI_SECTOR:
case ObservationZone::Shape::SYMMETRIC_QUADRANT:
return TaskPointFactoryType::FINISH_SECTOR;
case ObservationZone::Shape::LINE:
return TaskPointFactoryType::FINISH_LINE;
case ObservationZone::Shape::CYLINDER:
case ObservationZone::Shape::MAT_CYLINDER:
case ObservationZone::Shape::SECTOR:
case ObservationZone::Shape::DAEC_KEYHOLE:
case ObservationZone::Shape::CUSTOM_KEYHOLE:
case ObservationZone::Shape::BGAFIXEDCOURSE:
case ObservationZone::Shape::BGAENHANCEDOPTION:
case ObservationZone::Shape::ANNULAR_SECTOR:
//.........这里部分代码省略.........