AftGangAglay Documentation


objind

New in 2.2.0

Note: It is advised that you read the object documentation before this page in order to familiarise yourself with relevant terms and concepts.

Parameters

Parameter Type Description
object nativeptr The object whose index to get

Return Value

Type Description
int The object's index

Description

Returns object's unique index. This differs from the handle and aims to occupy a 24-bit integer to be used for picking. This index is stored in model vertices' color field which can be accessed with getpix when texture mapping is disabled.

Example

import agan

class game():
	def create(self):
		self.obj = agan.mkobj('foo.sgml')
		return self
	#
	def update(self):
		agan.log(agan.objind(self.obj))
	#
	def close(self):
		pass