CodeSubWars 0.4.7b
CodeSubWars::CSWMapElement Class Reference

#include <CSWMap.h>

Public Member Functions

bool isValid () const

Public Attributes

unsigned long nID
Vector3D vecWorldTPosition
Vector3D vecWorldTVelocity
unsigned long nLevel
long nUserData

Detailed Description

This represents a single element of a CSWMap e.g. an object reported by sonar.

Member Function Documentation

◆ isValid()

bool CodeSubWars::CSWMapElement::isValid ( ) const

Returns if the element is valid.

Returns true if the element is valid otherwise false.

Member Data Documentation

◆ nID

unsigned long CodeSubWars::CSWMapElement::nID

The id of the element. It is ensured that this id is system wide unique. Only inserted elements have a valid id.

◆ nLevel

unsigned long CodeSubWars::CSWMapElement::nLevel

The danger level regarding to the element.

◆ nUserData

long CodeSubWars::CSWMapElement::nUserData

Data that can be set by the user.

◆ vecWorldTPosition

Vector3D CodeSubWars::CSWMapElement::vecWorldTPosition

The position regarding to the element in world coordinate system.

◆ vecWorldTVelocity

Vector3D CodeSubWars::CSWMapElement::vecWorldTVelocity

The approximate velocity regarding to the element in m/s in world coordinate system. This is calculated from the detection difference of the current and the last position and time.
vApprox = (vecCurrent - vecLast)/(timeCurrent - timeLast)

Generated at Sun Aug 7 2022 for project CodeSubWars.