GithubHelp home page GithubHelp logo

Comments (7)

dearman avatar dearman commented on July 1, 2024

Should just follow the typical cmake workflow. I have uploaded sample CMakeCache.sample files in each repo to illustrate a typical configuration. I can answer more specific questions.

from activizdotnet.

csumushu avatar csumushu commented on July 1, 2024

Thank you, I'll try

from activizdotnet.

csumushu avatar csumushu commented on July 1, 2024

Excuse me, I have a question to ask you. Can you direct me? I want to use the Dot function in ActiViz, But the result seems wrong. Can you tell me what's wrong with it? Here's my code。

        double[] v1 = new double[] { 1, 0, 0 };
        double[] v2 = new double[] { 1, 0, 0 };
        IntPtr pv1 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(double)) * 3);
        IntPtr pv2 = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(double)) * 3);
        Marshal.Copy(v1, 0, pv1, 3);
        Marshal.Copy(v2, 0, pv2, 3);
        double v1v2 = vtkMath.Dot(pv1, pv2);
        Console.WriteLine("Dot:{0}", v1v2);
        Marshal.FreeHGlobal(pv1);
        Marshal.FreeHGlobal(pv2);
        Console.ReadLine();

from activizdotnet.

dearman avatar dearman commented on July 1, 2024

I can take a look. But I am unfamiliar with that specific function in VTK, so take what I'm saying with a grain of salt. Also, you may want to check out the mess of code I uploaded to the Activiz-WPF repo. It was stripped out of an application I was working on, and all functions, although I have not organized it back into a coherent and buildable demo yet.

from activizdotnet.

dearman avatar dearman commented on July 1, 2024

The first thing I notice is that I would not setup as you have. Look at using the 'pin'. Pin your input double arrays.

from activizdotnet.

dearman avatar dearman commented on July 1, 2024

https://www.codeproject.com/Articles/38695/UnCommon-C-keywords-A-Look

  1. Fixed

Another uncommon keyword is Fixed which can only be used in Unsafe C# code blocks. Fixed statement sets the pointer to be in a fixed memory address so that, it will not be moved to anywhere even if Garbage Collection Thread is invoked. Let us have a look at the code below:

int[] a = new int[] { 1, 2, 3 };
fixed (int* pt = a)
{
   int* c = pt;
   MessageBox.Show("Value : " + *c);
   // This will fix the variable totally so that it will
   // not be moved when Garbage collector is invoked. 
}

Here, the Pointer c is be assigned the same location as pt.

Fixed often comes at a cost. It is actually hampers the normal process of Garbage collection. Thus if is good to avoid fixed statement if not actually needed.

from activizdotnet.

csumushu avatar csumushu commented on July 1, 2024

Thank you. I don't know why it's wrong, but I've found a solution
http://vtk.1045678.n5.nabble.com/Distance-between-points-tc5725380.html#a5725382

from activizdotnet.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.