Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 SDK Documentation | Builds | BA3 Home
AltusUnified::DynamicMarker Class Reference

Conveys information about a marker that will have its attributes updated frequently. More...

Public Member Functions

 DynamicMarker (string name, float weight, Transform transform, Texture texture, vec2d anchorPoint, vec2d offset, MarkerRotationType rotationType, vec2i hitTestSize)
 Constructor More...
 
string getName ()
 Retrieves the name of this marker. More...
 
void updateTexture (Texture texture)
 Changes the raster image that is used to represent the marker. More...
 
void setVisibility (bool visible)
 Sets the visibility of this marker. More...
 
void updateAnchorPoint (vec2d anchorPoint)
 Updates the anchor point of this marker. More...
 
void updateOffset (vec2d offset)
 Updates the offset of this marker. More...
 
void updateHitTestSize (vec2d hitTestSize)
 Updates the hit test size of this marker. More...
 
vec2d offset ()
 The markers offset if pixels. More...
 
void offset_set (vec2d val)
 
vec2d anchorPoint ()
 The rotation anchor point in pixels. More...
 
void anchorPoint_set (vec2d val)
 
vec2i hitTestSize ()
 The hit test size in pixels. More...
 
void hitTestSize_set (vec2i val)
 

Public Attributes

float weight
 The weight of the marker. More...
 
TransformPtr transform
 The marker's transform. More...
 
TexturePtr texture
 The texture used to represent the marker. More...
 
MarkerRotationType rotationType
 The type of rotation used by the marker. More...
 

Detailed Description

Conveys information about a marker that will have its attributes updated frequently.

Constructor & Destructor Documentation

AltusUnified::DynamicMarker::DynamicMarker ( string  name,
float  weight,
Transform  transform,
Texture  texture,
vec2d  anchorPoint,
vec2d  offset,
MarkerRotationType  rotationType,
vec2i  hitTestSize 
)

Constructor

Parameters
nameName of the dynamic marker
transformThe location and orientation of the marker. Update this transform to move the marker.
textureThe texture (image) of the marker.
anchorPointanchor point (defaults to vec2d::ZERO)
offsetoffset (defaults to vec2d::ZERO)
rotationTyperotation type (defaults to MarkerRotationType::ROTATION_SCREENEDGE_ALIGNED)
hitTestSizehit test size (defaults to 128, 128). If hitTestSize if (0,0), the size of the texture is used.

Member Function Documentation

vec2d AltusUnified::DynamicMarker::anchorPoint ( )

The rotation anchor point in pixels.

void AltusUnified::DynamicMarker::anchorPoint_set ( vec2d  val)
string AltusUnified::DynamicMarker::getName ( )

Retrieves the name of this marker.

vec2i AltusUnified::DynamicMarker::hitTestSize ( )

The hit test size in pixels.

void AltusUnified::DynamicMarker::hitTestSize_set ( vec2i  val)
vec2d AltusUnified::DynamicMarker::offset ( )

The markers offset if pixels.

void AltusUnified::DynamicMarker::offset_set ( vec2d  val)
void AltusUnified::DynamicMarker::setVisibility ( bool  visible)

Sets the visibility of this marker.

void AltusUnified::DynamicMarker::updateAnchorPoint ( vec2d  anchorPoint)

Updates the anchor point of this marker.

void AltusUnified::DynamicMarker::updateHitTestSize ( vec2d  hitTestSize)

Updates the hit test size of this marker.

Parameters
hitTestSizeIf hitTestSize if (0,0), the size of the texture is used.
void AltusUnified::DynamicMarker::updateOffset ( vec2d  offset)

Updates the offset of this marker.

void AltusUnified::DynamicMarker::updateTexture ( Texture  texture)

Changes the raster image that is used to represent the marker.

Parameters
textureThe new image.

Member Data Documentation

MarkerRotationType AltusUnified::DynamicMarker::rotationType

The type of rotation used by the marker.

TexturePtr AltusUnified::DynamicMarker::texture

The texture used to represent the marker.

TransformPtr AltusUnified::DynamicMarker::transform

The marker's transform.

float AltusUnified::DynamicMarker::weight

The weight of the marker.