<commit_before>/*************************************************************************
 *                                                                       *
 * Open Dynamics Engine, Copyright (C) 2001-2003 <NAME>.       *
 * All rights reserved.  Email: <EMAIL>   Web: www.q12.org          *
 *                                                                       *
 * This library is free software; you can redistribute it and/or         *
 * modify it under the terms of EITHER:                                  *
 *   (1) The GNU Lesser General Public License as published by the Free  *
 *       Software Foundation; either version 2.1 of the License, or (at  *
 *       your option) any later version. The text of the GNU Lesser      *
 *       General Public License is included with this library in the     *
 *       file LICENSE.TXT.                                               *
 *   (2) The BSD-style license that is included with this library in     *
 *       the file LICENSE-BSD.TXT.                                       *
 *                                                                       *
 * This library is distributed in the hope that it will be useful,       *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
 * LICENSE.TXT and LICENSE-BSD.TXT for more details.                     *
 *                                                                       *
 *************************************************************************/
package org.ode4j.cpp.internal;

import org.cpp4j.java.DoubleArray;
import org.cpp4j.java.RefInt;
import org.ode4j.math.DVector3;
import org.ode4j.ode.DGeom;
import org.ode4j.ode.DSpace;
import org.ode4j.ode.DTriMesh;
import org.ode4j.ode.DTriMeshData;
import org.ode4j.ode.OdeHelper;
import org.ode4j.ode.DTriMesh.DTriArrayCallback;
import org.ode4j.ode.DTriMesh.DTriCallback;
import org.ode4j.ode.DTriMesh.DTriRayCallback;
import org.ode4j.ode.internal.DxTriMeshData;
import org.ode4j.ode.internal.Common.DMatrix4;


/**
 * TriMesh code by <NAME>.
 *
 * Trimesh data.
 * This is where the actual vertexdata (pointers), and BV tree is stored.
 * Vertices should be single precision!
 * This should be more sophisticated, so that the user can easyly implement
 * another collision library, but this is a lot of work, and also costs some
 * performance because some data has to be copied.
 */
public class ApiCppCollisionTrimesh extends ApiCppTimer {

	/**
	 * Data storage for triangle meshes.
	 */
	//struct dxTriMeshData;
	//typedef struct dxTriMeshData* dTriMeshDataID;

	/**
	 * These dont make much sense now, but they will later when we add more
	 * features.
	 */
	//ODE_API 
	public static DTriMeshData dGeomTriMeshDataCreate() {
		return OdeHelper.createTriMeshData();
	}
	//ODE_API 
	public static void dGeomTriMeshDataDestroy(DTriMeshData g) {
		g.destroy();
	}


	/** @deprecated TZ: find a better name. */
	enum TRIMESH1 { TRIMESH_FACE_NORMALS };
	//ODE_API 
	void dGeomTriMeshDataSet(DTriMeshData g, int data_id, Object in_data) {
		throw new UnsupportedOperationException();
	}
	//ODE_API 
	Object dGeomTriMeshDataGet(DTriMeshData g, int data_id) {
		throw new UnsupportedOperationException();
	}



	/**
	 * We need to set the last transform after each time step for 
	 * accurate collision response. These functions get and set that transform.
	 * It is stored per geom instance, rather than per dTriMeshData.
	 */
	//ODE_API 
	void dGeomTriMeshSetLastTransform( DGeom g, DMatrix4 last_trans ) {
		throw new UnsupportedOperationException();
	}
	public static void dGeomTriMeshSetLastTransform( DTriMesh g, DoubleArray last_trans ) {
		throw new UnsupportedOperationException();
	}
	//ODE_API 
	double[] dGeomTriMeshGetLastTransform( DGeom g ) {
		throw new UnsupportedOperationException();
	}

	/**
	 * Build a TriMesh data object with single precision vertex data.
	 */
	//ODE_API 
	//	 void dGeomTriMeshDataBuildSingle(dTriMeshData g,
	//             final void* Vertices, int VertexStride, int VertexCount, 
	//             final void* Indices, int IndexCount, int TriStride);
	public static void dGeomTriMeshDataBuildSingle(DTriMeshData g,
			final float[] Vertices, int VertexStride, int VertexCount, 
			final int[] Indices, int IndexCount, int TriStride) {
		((DxTriMeshData)g).build(Vertices, //VertexStride, VertexCount, 
				Indices);//, IndexCount, TriStride);
	}
	/** same again with a normals array (used as trimesh-trimesh optimization) */
	//ODE_API 
	//	 void dGeomTriMeshDataBuildSingle1(dTriMeshData g,
	//                                  final void* Vertices, int VertexStride, int VertexCount, <commit_msg>Fixed deprecation and javadoc warnings<commit_after>/*************************************************************************
 *                                                                       *
 * Open Dynamics Engine, Copyright (C) 2001-2003 <NAME>.       *
 * All rights reserved.  Email: <EMAIL>   Web: www.q12.org          *
 *                                                                       *
 * This library is free software; you can redistribute it and/or         *
 * modify it under the terms of EITHER:                                  *
 *   (1) The GNU Lesser General Public License as published by the Free  *
 *       Software Foundation; either version 2.1 of the License, or (at  *
 *       your option) any later version. The text of the GNU Lesser      *
 *       General Public License is included with this library in the     *
 *       file LICENSE.TXT.                                               *
 *   (2) The BSD-style license that is included with this library in     *
 *       the file LICENSE-BSD.TXT.                                       *
 *                                                                       *
 * This library is distributed in the hope that it will be useful,       *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
 * LICENSE.TXT and LICENSE-BSD.TXT for more details.                     *
 *                                                                       *
 *************************************************************************/
package org.ode4j.cpp.internal;

import org.cpp4j.java.DoubleArray;
import org.cpp4j.java.RefInt;
import org.ode4j.math.DVector3;
import org.ode4j.ode.DGeom;
import org.ode4j.ode.DSpace;
import org.ode4j.ode.DTriMesh;
import org.ode4j.ode.DTriMeshData;
import org.ode4j.ode.OdeHelper;
import org.ode4j.ode.DTriMesh.DTriArrayCallback;
import org.ode4j.ode.DTriMesh.DTriCallback;
import org.ode4j.ode.DTriMesh.DTriRayCallback;
import org.ode4j.ode.internal.DxTriMeshData;


/**
 * TriMesh code by <NAME>.
 *
 * Trimesh data.
 * This is where the actual vertexdata (pointers), and BV tree is stored.
 * Vertices should be single precision!
 * This should be more sophisticated, so that the user can easyly implement
 * another collision library, but this is a lot of work, and also costs some
 * performance because some data has to be copied.
 */
public class ApiCppCollisionTrimesh extends ApiCppTimer {

	/**
	 * Data storage for triangle meshes.
	 */
	//struct dxTriMeshData;
	//typedef struct dxTriMeshData* dTriMeshDataID;

	/**
	 * These dont make much sense now, but they will later when we add more
	 * features.
	 */
	//ODE_API 
	public static DTriMeshData dGeomTriMeshDataCreate() {
		return OdeHelper.createTriMeshData();
	}
	//ODE_API 
	public static void dGeomTriMeshDataDestroy(DTriMeshData g) {
		g.destroy();
	}


	/** @deprecated TZ: find a better name. */
	enum TRIMESH1 { TRIMESH_FACE_NORMALS };
	//ODE_API 
	void dGeomTriMeshDataSet(DTriMeshData g, int data_id, Object in_data) {
		throw new UnsupportedOperationException();
	}
	//ODE_API 
	Object dGeomTriMeshDataGet(DTriMeshData g, int data_id) {
		throw new UnsupportedOperationException();
	}



	/**
	 * We need to set the last transform after each time step for 
	 * accurate collision response. These functions get and set that transform.
	 * It is stored per geom instance, rather than per dTriMeshData.
	 */
	//ODE_API 
	//void dGeomTriMeshSetLastTransform( DGeom g, DMatrix4 last_trans ) {
	//	throw new UnsupportedOperationException();
	//}
	public static void dGeomTriMeshSetLastTransform( DTriMesh g, DoubleArray last_trans ) {
		throw new UnsupportedOperationException();
	}
	//ODE_API 
	double[] dGeomTriMeshGetLastTransform( DGeom g ) {
		throw new UnsupportedOperationException();
	}

	/**
	 * Build a TriMesh data object with single precision vertex data.
	 */
	//ODE_API 
	//	 void dGeomTriMeshDataBuildSingle(dTriMeshData g,
	//             final void* Vertices, int VertexStride, int VertexCount, 
	//             final void* Indices, int IndexCount, int TriStride);
	public static void dGeomTriMeshDataBuildSingle(DTriMeshData g,
			final float[] Vertices, int VertexStride, int VertexCount, 
			final int[] Indices, int IndexCount, int TriStride) {
		((DxTriMeshData)g).build(Vertices, //VertexStride, VertexCount, 
				Indices);//, IndexCount, TriStride);
	}
	/** same again with a normals array (used as trimesh-trimesh optimization) */
	//ODE_API 
	//	 void dGeomTriMeshDataBuildSingle1(dTriMeshData g,
	//                                  final void* Vertices, int VertexStride, int VertexCount, 
{'fraction_non_alphanumeric': 0.10887096774193548, 'fraction_numerical': 0.006791171477079796, 'mean_word_length': 2.4727339719970525, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1889619', 'n_tokens_mistral': 2736, 'n_tokens_neox': 2601, 'n_words': 848}