HERE iOS SDK Developer's Guide

NMAARModelObject

Class Summary

class NMAARModelObject

Derived from: NSObject

The base class for all LiveSight 3D objects that users can add to an NMAARController.

Include: NMAKit.framework/headers/NMAARModelObject.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAARModelObject

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, assign] CGPoint  dynamicScaleFactors

The minimum and maximum scale factors used for dynamic scaling

[readable, writable, assign] CGPoint  dynamicScaleRange

The range of distances in meters over which the object's scaling is linearly interpolated

[readable, writable, assign] CGFloat  opacity

The opacity level of the object

[readable, writable, assign] NMAARModelObjectShadingMode   shadingMode

The shading mode of the object

[readable, writable, assign] NMAImage texture

The texture of the object

[readable, writable, assign] CGPoint  visibilityRange

The range of distances in meters from the camera inside which the object is visible

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(void) clearTransformation

Resets the model transformation to the identity matrix

-(void) getTransformation:(float[]) transformation

Gets the current model transform matrix for the object

-(void) rotate:( NMAVector3d ) rotationAngles

Rotates the object around the Cartesian axes (the model matrix is post-multiplied)

-(void) rotateWithAxis:( NMAVector3d ) rotationAxis angle:(CGFloat) rotationAngleDeg

Rotates the object an arbitrary amount around an arbitrary axis (the model matrix is post-multiplied)

-(void) scale:( NMAVector3d ) scaleFactors

Scales the object in three dimensions (the model matrix is post-multiplied)

-(void) setTransformation:(const float[]) transformation

Sets the model transform matrix for the object

-(void) translate:( NMAVector3d ) translation

Translates the object (the model matrix is post-multiplied)

Class Details

The base class for all LiveSight 3D objects that users can add to an NMAARController.

This class serves as the abstract base for more specific 3D object classes. It contains a set of common properties including the object's transformation and appearance in 3D space.

Public Property Details

[readable, writable, assign] CGPoint dynamicScaleFactors

The minimum and maximum scale factors used for dynamic scaling.

The default values are {1.0, 1.0}, meaning that no scaling is applied at any distance.

See also:

NMAARModelObject::dynamicScaleRange

[readable, writable, assign] CGPoint dynamicScaleRange

The range of distances in meters over which the object's scaling is linearly interpolated.

The dynamic scale range may be used to change the apparent size of the object based on its distance from the camera. When dynamic scaling is used, the object is scaled as a linear function of its distance to the camera. The scaling is applied after the model transformation of the object.

The scaling is defined as follows:

scaling(distance) = s_min if distance < d_min = s_max if distance > d_max = s_min + (distance - d_min) / (d_max - d_min) * (s_max - s_min), otherwise

where [d_min, d_max] is the dynamicScaleRange and {s_min, s_max} are the dynamicScaleFactors. For both properties, x and y of the points represent the min and max values, respectively.

The defauly dynamic scale range is [0, 1000].

[readable, writable, assign] CGFloat opacity

The opacity level of the object.

A value of 1.0 (the default) renders the object fully opaque. A value of 0.0 renders the object fully transparent (invisible).

[readable, writable, assign] NMAARModelObjectShadingMode  shadingMode

The shading mode of the object.

The default value is NMAARModelObjectShadingModeDiffuseTextured.

[readable, writable, assign] NMAImagetexture

The texture of the object.

[readable, writable, assign] CGPoint visibilityRange

The range of distances in meters from the camera inside which the object is visible.

The x and y values of the CGPoint represent the minimum and maximum visible distances, respectively.

The default range is [0,1000], meaning that the object will be visible at any distance closer than 1000 meters.

Instance Method Details

-(void) clearTransformation

Resets the model transformation to the identity matrix.

-(void) getTransformation:(float[]) transformation

Gets the current model transform matrix for the object.

The default value is the identity matrix.

Parameters:

  • transformation

    A pre-allocated float array of size 16 in which the model transformation matrix will be stored in column major order.

-(void) rotate:( NMAVector3d ) rotationAngles

Rotates the object around the Cartesian axes (the model matrix is post-multiplied).

Parameters:

  • rotationAngles

    The rotation angles in degrees around the x, y, and z axes, conforming to the right-hand convention.

-(void) rotateWithAxis:( NMAVector3d ) rotationAxis angle:(CGFloat) rotationAngleDeg

Rotates the object an arbitrary amount around an arbitrary axis (the model matrix is post-multiplied).

Parameters:

  • rotationAxis

    The axis of rotation.

  • rotationAngleDeg

    The rotation angle in degrees conforming to the right-hand convention.

-(void) scale:( NMAVector3d ) scaleFactors

Scales the object in three dimensions (the model matrix is post-multiplied).

Parameters:

  • scaleFactors

    The scaling factors applied along the object's x-axis, y-axis, and z-axis.

-(void) setTransformation:(const float[]) transformation

Sets the model transform matrix for the object.

Parameters:

  • transformation

    An array of 16 float values defining the new 4x4 model transformation matrix in column major order.

-(void) translate:( NMAVector3d ) translation

Translates the object (the model matrix is post-multiplied).

Parameters:

  • translation

    The translation amounts in meters along the x, y, and z axes.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.