public void SetMesh(Vector3[] vertices, int[] indices) { if (_model == null) { _model = new PrimeModel(_context); } var vertexBuffer = _context.CreateBuffer(RTPBufferType.Host, RtpBufferFormat.VERTEX_FLOAT3, vertices); var indexBuffer = _context.CreateBuffer(RTPBufferType.Host, RtpBufferFormat.IndicesInt3, indices); indexBuffer.SetRange(0u, (uint)(indices.Length / 3)); vertexBuffer.SetRange(0u, (uint)vertices.Length); _model.SetTriangles(indexBuffer, vertexBuffer); _model.Update(RTPmodelhint.RTP_MODEL_HINT_NONE); _model.Finish(); }
public PrimeQuery(PrimeContext context, PrimeModel model, QueryType queryType) : base(context) { _queryType = queryType; CheckError(PrimeApi.rtpQueryCreate(model.InternalPtr, (RTPquerytype)queryType, out InternalPtr)); }