OmniGraph Node omni.graph.nodes.ReadMouseState

omni.graph.nodes.ReadMouseState Properties

Name

Value

Version

1

Extension

omni.graph.nodes

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Read Mouse State

__categories

input:mouse

Generated Class Name

OgnReadMouseStateDatabase

Python Module

omni.graph.nodes

omni.graph.nodes.ReadMouseState Description

Reads the current state of the mouse You can choose which mouse element this node is associated with. When mouse element is chosen to be a button, only outputs:isPressed is meaningful. When coordinates are chosen, only outputs:coords is meaningful. You can choose to output normalized or pixel coordinates of the mouse. Pixel coordinates are the absolute position of the mouse cursor in pixel unit. The original point is the upper left corner. The mininum value is 0, and the maximum value depends on the size of the window. Normalized coordinates are the relative position of the mouse cursor to the window. The value is always between 0 and 1.

omni.graph.nodes.ReadMouseState Inputs

Name

Type

Default

Required?

Descripton

inputs:mouseElement

token

Left Button

Y

The mouse input to check the state of

displayGroup

parameters

allowedTokens

Left Button,Right Button,Middle Button,Forward Button,Back Button,Normalized Mouse Coordinates,Absolute Mouse Coordinates

__allowedTokens

{“LeftButton”: “Left Button”, “RightButton”: “Right Button”, “MiddleButton”: “Middle Button”, “ForwardButton”: “Forward Button”, “BackButton”: “Back Button”, “MouseCoordsNormalized”: “Normalized Mouse Coordinates”, “MouseCoordsPixel”: “Absolute Mouse Coordinates”}

uiName

Mouse Element

__default

“Left Button”

omni.graph.nodes.ReadMouseState Outputs

Name

Type

Default

Required?

Descripton

outputs:coords

float[2]

None

Y

The coordinates of the mouse. If the Mouse Element selected is a button, this will output a zero vector

outputs:isPressed

bool

None

Y

True if the button is currently pressed, false otherwise. If the Mouse Input selected is coordinates, this will output false